-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Show clearer error message when #![deny(warnings)] escalates a warning #30804
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Aatch (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. |
This can probably use a compile-fail test |
Added, hopefully that's complete enough. I'm not familiar writing tests for rustc, but it passed when I ran P.S. Is there a way to run just one test file at a time? The Makefile is a bit confusing on this. |
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
#![deny(warnings)] |
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.
this should also have a comment saying //~ NOTE: lint level defined here
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.
Okay, that's what I was unsure of. I've pushed another commit adding this.
|
r? @nrc (lint stuff?) |
Apologies for the late review, I've been on vacation. |
(self.lints().get_level_source(lint_id).0, src) | ||
let warn_src = self.lints().get_level_source(lint_id); | ||
if warn_src.0 != Warn { | ||
warn_src |
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.
maybe better to make warn_src mutable
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.
or not, actually. Sorry.
@bors: r+ |
📌 Commit a5bdc43 has been approved by |
Show clearer error message when #![deny(warnings)] escalates a warning Addresses #30730
Addresses #30730