Skip to content

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

Merged
merged 3 commits into from
Mar 9, 2016

Conversation

shssoichiro
Copy link
Contributor

Addresses #30730

@rust-highfive
Copy link
Contributor

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.

@oli-obk
Copy link
Contributor

oli-obk commented Jan 12, 2016

This can probably use a compile-fail test

@shssoichiro
Copy link
Contributor Author

Added, hopefully that's complete enough. I'm not familiar writing tests for rustc, but it passed when I ran make check.

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)]
Copy link
Contributor

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

Copy link
Contributor Author

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.

@oli-obk
Copy link
Contributor

oli-obk commented Jan 12, 2016

make check-stage1-cfail TESTNAME=blub (you can find this under make tips)

@alexcrichton
Copy link
Member

r? @nrc (lint stuff?)

@rust-highfive rust-highfive assigned nrc and unassigned Aatch Feb 22, 2016
@nrc
Copy link
Member

nrc commented Mar 9, 2016

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
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or not, actually. Sorry.

@nrc
Copy link
Member

nrc commented Mar 9, 2016

@bors: r+

@bors
Copy link
Collaborator

bors commented Mar 9, 2016

📌 Commit a5bdc43 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Mar 9, 2016

⌛ Testing commit a5bdc43 with merge 4b86841...

bors added a commit that referenced this pull request Mar 9, 2016
Show clearer error message when #![deny(warnings)] escalates a warning

Addresses #30730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants