-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Respect #[expect]
the same way #[allow]
is with the dead_code
lint
#114710
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit d801a2f with merge add9a3405485dd24dd88b285a65a8cf2b2961aaf... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (add9a3405485dd24dd88b285a65a8cf2b2961aaf): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 632.409s -> 631.435s (-0.15%) |
Thanks for the fix. I agree this is the cleanest solution. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1e836d1): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 632.973s -> 632.609s (-0.06%) |
seems like noise marking as triaged @rustbot label: +perf-regression-triaged |
This PR makes the
#[expect]
attribute being respected in the same way the#[allow]
attribute is with thedead_code
lint.The fix is much more involved than I would have liked (and it's not because I didn't tried!), because the implementation took advantage of the fact that firing a lint in a allow context is a no-op (for the user, as the lint is suppressed), to not fire-it at all.
And while it's fine for
#[allow]
, it definitively isn't for#[expect]
, as the presence and absence of a lint is significant. So a big part of the PR is just adding the context information of whenever an item is on the worklist because of an[allow]
/#[expect]
or not.Fixes #114557