brson · GitHub

This has frustrated me several times. Lint errors are at their best when they tell you which lint triggered them. Example

fn main() { }
fn foo() { }
warning: function is never used: `foo`, #[warn(dead_code)] on by default
 --> main.rs:2:1
  |
2 | fn foo() { }
  | ^^^^^^^^^^^^

So now I know that if the lint is wrong I can write allow(dead_code). On the other hand:

#![deny(warnings)]
fn main() { }
fn foo() { }
error: function is never used: `foo`
 --> main.rs:3:1
  |
3 | fn foo() { }
  | ^^^^^^^^^^^^
  |
note: lint level defined here
 --> main.rs:1:9
  |
1 | #![deny(warnings)]
  |         ^^^^^^^^
error: aborting due to previous error

Now I have no idea what to write to shut the compiler up. Likewise:

#![deny(unused)]
fn main() { }
fn foo() { }

Read the original on github.com ↗