Uh oh!
There was an error while loading. Please reload this page.
Omit 'obsolete' note for a warning with -Awarning - #23782
Conversation
rust-highfive
commented
Mar 27, 2015
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kmcallister (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. 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 CONTRIBUTING.md for more information. |
There was a problem hiding this comment.
Can we have some documentation explaining the arguments and when to use this?
huonw
commented
Apr 15, 2015
r? @alexcrichton (randomish assignment to fill the void) |
alexcrichton
commented
Apr 16, 2015
This function is currently only used in one location, and has a bit of a mouthful of a signature, so could it just manually check for |
mvdnes
commented
Apr 16, 2015
The field is public, so that is a possibility aswell. |
alexcrichton
commented
Apr 16, 2015
Sounds good to me! |
mvdnes
commented
Apr 16, 2015
I have pushed the alternative solution. |
alexcrichton
commented
Apr 16, 2015
When emmitting a note, previously it was not known if the note was for an error or a
warning. If it was for a warning, then with `-Awarnings` it should not have been print.
The `emit_for` function allows someone to specify which level should determine its visibility.
An example:
```rust
extern crate "std" as std2;
fn main() {}
```
When compiling with `-Awarnings`, this would previously emit `note: use an identifier not in quotes instead` (and nothing else).
With this patch, it will be completely silent as expected. When emmitting a note, previously it was not known if the note was for an error or a
warning. If it was for a warning, then with `-Awarnings` it should not have been print.
The `emit_for` function allows someone to specify which level should determine its visibility.
An example:
```rust
extern crate \"std\" as std2;
fn main() {}
```
When compiling with `-Awarnings`, this would previously emit `note: use an identifier not in quotes instead` (and nothing else).
With this patch, it will be completely silent as expected. When emmitting a note, previously it was not known if the note was for an error or a
warning. If it was for a warning, then with `-Awarnings` it should not have been print.
The `emit_for` function allows someone to specify which level should determine its visibility.
An example:
```rust
extern crate \"std\" as std2;
fn main() {}
```
When compiling with `-Awarnings`, this would previously emit `note: use an identifier not in quotes instead` (and nothing else).
With this patch, it will be completely silent as expected.steveklabnik
commented
Apr 17, 2015
This was merged in #24512 , sorry, I rebased and forgot that'd screw it up :( |
When emmitting a note, previously it was not known if the note was for an error or a
warning. If it was for a warning, then with
-Awarningsit should not have been print.The
emit_forfunction allows someone to specify which level should determine its visibility.An example:
When compiling with
-Awarnings, this would previously emitnote: use an identifier not in quotes instead(and nothing else).With this patch, it will be completely silent as expected.