Remove AttributeLintKind#155760
Conversation
|
Some changes occurred to diagnostic attributes. cc @mejrs Some changes occurred in compiler/rustc_attr_parsing |
This comment has been minimized.
This comment has been minimized.
|
(Assigning myself for the suspicious infrastructural changes in the first commit.) |
| cx.emit_dyn_lint( | ||
| rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES, | ||
| move |dcx, level| { | ||
| move |dcx, level, _| { |
There was a problem hiding this comment.
Also kinda sad that all the calls need to ignore the third argument now except the few cursed ones that need it.
Some alternatives are:
- Create a separate function next to
emit_dyn_lintthat takes a closure with the special argument - My idea in the next comment, with making session the first argument
There was a problem hiding this comment.
I think having a different function is likely better. For the session idea, answered in the other comment.
| sess: &Session, | ||
| inst: &impl Fn(EscapeQuotes) -> String, | ||
| ) -> lints::UnexpectedCfgCargoHelp { | ||
| ) -> errors::UnexpectedCfgCargoHelp { |
There was a problem hiding this comment.
nit: I find it weird that the unexpected_cfgs diagnostic structs are in an errors module, while we are talking about a warn-by-default lint. I would expected only hard errors in an errors module, not warnings.
There was a problem hiding this comment.
There is no clear pattern of where you put Diagnostic types. By default, it's mostly in crate::errors, even if it's lints.
There was a problem hiding this comment.
One of the things on my todo list is do find a better name for these modules, perhaps diagnostics.rs
There was a problem hiding this comment.
I would third (not sure if that's actually a thing) it.
|
|
|
Not ready yet. Just cleaning up a few things. Still need to update the |
This comment has been minimized.
This comment has been minimized.
|
Let's check perf. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove `AttributeLintKind`
This comment has been minimized.
This comment has been minimized.
|
LGTM now, although it would be good to squash commits to avoid many back and forth changes. |
Create a new `SharedContext::emit_dyn_lint_with_sess` method to simplify code when `Session` is not needed Remove crate name from `UnexpectedCfgCargoMacroHelp`
292a873 to
faecc47
Compare
|
@bors r=JonathanBrouwer,petrochenkov rollup=iffy |
…d, r=JonathanBrouwer,petrochenkov Remove `AttributeLintKind` Part of rust-lang#153099. The `AttributeLintKind` type is finally gone! \o/ Diff is this big because I moved a file and a lot of `Diagnostic` types. :') r? @JonathanBrouwer
…uwer Rollup of 9 pull requests Successful merges: - #155760 (Remove `AttributeLintKind`) - #154510 (Partially stabilize LoongArch target features) - #155137 (Allow trailing `self` in more contexts) - #155433 (Rip out rustc_layout_scalar_valid_range_* attribute support) - #155702 (Change `ItemKind::Trait` to a field variant.) - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder) - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`) - #155874 (Avoid misleading closure return type note) - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 345a975 (parent) -> 52b6e2c (this PR) Test differencesShow 6 test diffs6 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 52b6e2c208b73276ccb36ec0b68456913a801c96 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (52b6e2c): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -3.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.767s -> 487.959s (-0.37%) |
|
Regression is |
View all comments
Part of #153099.
The
AttributeLintKindtype is finally gone! \o/Diff is this big because I moved a file and a lot of
Diagnostictypes. :')r? @JonathanBrouwer