-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 for force-warns #85788
Support for force-warns #85788
Conversation
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.
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.
Left some notes on how to make this support lint groups (I think)
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.
Can you add an entry to the unstable book compiler flags listing:
https://github.com/rust-lang/rust/tree/master/src/doc/unstable-book/src/compiler-flags
I'm not sure if there is a SUMMARY.md to edit
This comment has been minimized.
This comment has been minimized.
Can this feature be implemented more simply as an additional lint level, similar to "forbid" but for warnings? |
@cjgillot I think it would be possible, but I'm not convinced it would be more simple. We want these lints to behave as they currently do in all situations except in the one case where we want to force them to warn. Having another lint level would force more of a cognitive burden on users and documentation maintenance. |
This comment has been minimized.
This comment has been minimized.
@bors r+ |
📌 Commit 896898e has been approved by |
☀️ Test successful - checks-actions |
Make ForceWarn a lint level. Follow-up to rust-lang#85788 cc `@rylev`
Implements #85512.
This PR adds a new command line option
force-warns
which will force the provided lints to warn even if they are allowed by some other mechanism such as#![allow(warnings)]
.Some remaining issues:
force-warns
should also be capable of taking lint groups instead of individual lints. This is not implemented.warn
, this will cause that lint to warn instead. We probably want to allow the lint to error if it is set to a higher lint and is not allowed somewhere else.force-warns
. I'm not sure why, but I wanted to get this in before the weekend.r? @nikomatsakis