-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Move even more early buffered lints to dyn lint diagnostics #147634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
Yeah, and it's even more complex as check-cfg lints are emitted from both rustc & rustdoc, which do not operate at the same time, rustc is at expansion time, while rustdoc is after expansion (and therefore has direct access to a |
|
The thing is, while currently only the post-expansion lint pass gets passed a We can easily pass the Not being able to name Footnotes
|
And I know we don't do that right now (we use |
This comment was marked as resolved.
This comment was marked as resolved.
a944814 to
3bce608
Compare
|
Fully dropped the check-cfg migration due to the reasons above. Maybe #149215 will fix the |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Move even more early buffered lints to dyn lint diagnostics
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3bce608 to
b1bf1e5
Compare
|
Finished benchmarking commit (cb75625): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 3.3%, secondary -4.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -3.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 469.915s -> 468.944s (-0.21%) |
|
cc: @JonathanBrouwer you were also running into the cfg lint issue recently weren't you? take a look at this pr |
tests/ui/imports/ambiguous-1.stderr
Outdated
| = note: `#[warn(ambiguous_glob_reexports)]` on by default | ||
|
|
||
| warning: `id` is ambiguous | ||
| warning[E0659]: `id` is ambiguous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool that we get error codes too now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm though the error code index only mentions other ambiguities that are actually errors, not this warning. Might be fine? Idk if we generally put error codes on lints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've grepped tests/ for warning\[ (I know it doesn't account for denied lints) and most results come from a lint I wrote, lol. Right, lint warnings are already associated with a lint name, so strictly speaking an error code doesn't make sense for them (~ well).
I'll change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually ambiguous_glob_imports is deny-by-default due to future_incompatible being deny-by-default. In the tests where it's a warning there's actually a #![warn(ambiguous_glob_imports)].
Anyways, once it's a hard error it'll get the error code and people might update the error code entry to better fit this case (but frankly that's unlikely ^^; and the error code index might even go away in the future ^^). Moreover, this PR is meant to be a refactoring PR :D
|
I hate all the proxy traits but I guess it will be the way to do it... what's here looks good. The lints that are migrated look good. @fmease if you know more about error codes on lints, lmk, otherwise r=me |
|
@jdonszelmann Yeah the linked PR #149215 is my PR :p The problem blocking that PR is that attribute lints have their own enum ( |
|
@rustbot author |
|
I didn't even link to the dropped commit even though most of the comments in this PR are concerned with it. So for reference / "posterity" (will probably get pruned at some point): fmease@c97e79f. |
b1bf1e5 to
109e5e5
Compare
|
@bors r=jdonszelmann |
…elmann Move even more early buffered lints to dyn lint diagnostics Follow-up to #145881 and #145747. I originally wanted to migrate most if not the entire rest of the early buffered lints. However, when trying to migrate the buffered lints used by check-cfg I encountered a roadblock. Namely, it depends on `TyCtxt` (well, `Option<TyCtxt>`) which makes it quite hard to migrate (see also #147634 (comment), #147634 (comment) & #149215). So for now, I won't migrate it (maybe #149215 will find a solution), nor will I migrate the rest since it's quite tedious to migrate these. I'll leave them for future me.
Follow-up to #145881 and #145747.
I originally wanted to migrate most if not the entire rest of the early buffered lints. However, when trying to migrate the buffered lints used by check-cfg I encountered a roadblock. Namely, it depends on
TyCtxt(well,Option<TyCtxt>) which makes it quite hard to migrate (see also #147634 (comment), #147634 (comment) & #149215).So for now, I won't migrate it (maybe #149215 will find a solution), nor will I migrate the rest since it's quite tedious to migrate these. I'll leave them for future me.