-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Support lint expectations for --force-warn
lints (RFC 2383)
#97757
Support lint expectations for --force-warn
lints (RFC 2383)
#97757
Conversation
Some changes occurred in src/tools/rustfmt. cc @rust-lang/rustfmt |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
☀️ Try build successful - checks-actions |
This comment was marked as off-topic.
This comment was marked as off-topic.
Finished benchmarking commit (8608dd3a0505ab79dd32b8873a7df850c163b711): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 Footnotes |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
It looks like hiding the comment triggered rust-timer again. :/ |
61a746c
to
ebbe09c
Compare
Alright, I've rebased on master. This PR should also be ready for review now. The performance run should still be valid. As a side note, I love how stable the CI is. I can just rebase on master and expect everything to be green. This is so beautiful! |
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.
Only a few comments about the documentation and a missing test. Impl LGTM
ebbe09c
to
16ecd42
Compare
Nice catches, thank you for the review @flip1995! |
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.
LGTM. Since it touches the compiler I'll leave the final r+ to Wesley again.
src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs
Show resolved
Hide resolved
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.
Great work!
r=me with that one nit addressed
16ecd42
to
8527a3d
Compare
Awesome, thank you for the review! I think we have two smaller things that need to be updated, and then this feature should be complete 🥳 @bors r=wesleywiser,flip1995 rollup=always |
📌 Commit 8527a3d has been approved by |
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#97757 (Support lint expectations for `--force-warn` lints (RFC 2383)) - rust-lang#98125 (Entry and_modify doc) - rust-lang#98137 (debuginfo: Fix NatVis for Rc and Arc with unsized pointees.) - rust-lang#98147 (Make #[cfg(bootstrap)] not error in proc macros on later stages ) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…-warn, r=wesleywiser,flip1995 Support lint expectations for `--force-warn` lints (RFC 2383) Rustc has a `--force-warn` flag, which overrides lint level attributes and forces the diagnostics to always be warn. This means, that for lint expectations, the diagnostic can't be suppressed as usual. This also means that the expectation would not be fulfilled, even if a lint had been triggered in the expected scope. This PR now also tracks the expectation ID in the `ForceWarn` level. I've also made some minor adjustments, to possibly catch more bugs and make the whole implementation more robust. This will probably conflict with rust-lang#97718. That PR should ideally be reviewed and merged first. The conflict itself will be trivial to fix. --- r? `@wesleywiser` cc: `@flip1995` since you've helped with the initial review and also discussed this topic with me. 🙃 Follow-up of: rust-lang#87835 Issue: rust-lang#85549 Yeah, and that's it.
Rustc has a
--force-warn
flag, which overrides lint level attributes and forces the diagnostics to always be warn. This means, that for lint expectations, the diagnostic can't be suppressed as usual. This also means that the expectation would not be fulfilled, even if a lint had been triggered in the expected scope.This PR now also tracks the expectation ID in the
ForceWarn
level. I've also made some minor adjustments, to possibly catch more bugs and make the whole implementation more robust.This will probably conflict with #97718. That PR should ideally be reviewed and merged first. The conflict itself will be trivial to fix.
r? @wesleywiser
cc: @flip1995 since you've helped with the initial review and also discussed this topic with me. 🙃
Follow-up of: #87835
Issue: #85549
Yeah, and that's it.