Uh oh!
There was an error while loading. Please reload this page.
Clarify what -D warnings or -F warnings does - #46136
Conversation
They set all lints currently on the warning level to `deny` or `forbid`, respectively.
rust-highfive
commented
Nov 20, 2017
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
tbu-
commented
Nov 20, 2017
Tested what it actually does by running with the lint |
shepmaster
commented
Nov 24, 2017
Ping from triage @pnkfelix — will you have some time to review this? |
nikomatsakis
left a comment
There was a problem hiding this comment.
I think we can do a bit better.
| println!(" {} {}", padded("name"), "sub-lints"); | ||
| println!(" {} {}", padded("----"), "---------"); | ||
| println!(" {} {}", padded("warnings"), "all built-in lints"); | ||
| println!(" {} {}", padded("warnings"), "all lints activated to the warning level"); |
There was a problem hiding this comment.
Hmm, I don't find this phrasing very clear. "The warning level" sounds to me like something that one can control independently. Perhaps "all lints set to warn", or "all lints that are set to issue warnings"?
There was a problem hiding this comment.
If you have a lint that defaults to allow, but you set it explicitly to warn, and then you do #[deny(warnings)], is that lint then denied?
There was a problem hiding this comment.
Hmm, I don't find this phrasing very clear.
Yea, I struggled to find a good wording. Thanks for the suggestions, I used the second one for now.
If you have a lint that defaults to allow, but you set it explicitly to warn, and then you do
#[deny(warnings)], is that lint then denied?
Yes.
#![deny(warnings)]
fn main() {
Box::new(());
}
$ rustc -W box-pointers a.rs
error: type uses owned (Box type) pointers: std::boxed::Box<()>
--> box.rs:3:5
|
3 | Box::new(());
| ^^^^^^^^^^^^
|
note: lint level defined here
--> box.rs:1:9
|
1 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(box_pointers)] implied by #[deny(warnings)]
error: aborting due to previous error
nikomatsakis
commented
Dec 1, 2017
nikomatsakis
commented
Dec 5, 2017
@bors r+ rollup |
bors
commented
Dec 5, 2017
📌 Commit e1e1dcc has been approved by |
bors
commented
Dec 6, 2017
⌛ Testing commit e1e1dcc with merge 3de30dd00edbc89613e93900a48ddfa4f8eb06a7... |
Clarify what `-D warnings` or `-F warnings` does They set all lints currently on the warning level to `deny` or `forbid`, respectively.
kennytm
commented
Dec 6, 2017
@bors retry — Prioritize for rollup (which included this PR...) |
They set all lints currently on the warning level to
denyorforbid,respectively.