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
add long explanation for E0453, lint attribute overruled by outer forbid #34242
Conversation
This is a subtask of rust-lang#32777.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
||
#[allow(non_snake_case)] | ||
fn main() { | ||
let MyNumber = 2; // error: allow(non_snake_case) overruled by outer |
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.
Please indent the error comment like this:
let MyNumber = 2; // error: allow(non_snake_case) overruled by outer
// forbid(non_snake_case)
Thanks for your PR! Just fix the two issues and it'll be good to go! |
It turns out that the subsequent lines of the error message comment should be aligned like this. The "turns the corresponding compiler warning" language may not be strictly the most accurate—a lint check isn't the same as a compiler warning; it emits a compiler warning if it's set to the `warn` level— but it may be worth glossing over such distinctions in favor of simple, familar phrasings for the sake of pedagogy; thanks to Guillaume Gomez for the wording suggestion. Let's also fix up the introductory clauses of the sentences about how to fix the error to put a little more emphasis on the fact that the `forbid` setting was probably there for a reason.
(In addition to addressing the two reviewer comments, the new commit also edits the introductory clauses of the how-to-fix-it sentences to be more cautious about recommending weakening |
All good for me. Thanks @zackmdavis! @bors: r+ rollup |
📌 Commit e4c566c has been approved by |
⌛ Testing commit e4c566c with merge c0df447... |
add long explanation for E0453, lint attribute overruled by outer forbid This is a subtask of #32777. ----- r? @GuillaumeGomez
This is a subtask of #32777.
r? @GuillaumeGomez