Closed
Description
Lint messages don't always explain the error in much detail, and so would often benefit from a detailed --explain
explanation just like normal errors, e.g. this will hit a dead_code warning, but that doesn't really help diagnose the problem (that mod foo;
is private), a detailed explanation could include discussion of the privacy/modules aspect of the lint.
#![crate_type = "lib"]
mod foo;
// foo.rs
pub fn bar() {}
foo.rs:2:1: 2:12 warning: function is never used: `bar`, #[warn(dead_code)] on by default
foo.rs:2 fn bar() {}
^~~~~~~~~~~
It might also make sense to have a generic "lints" detailed explanation, that (a) lints that don't have their own error message point to, and (b) that any specific lint explanation also points to ("see also [E...] for more on lints"). This could include the common details of how the allow
/etc. attributes work.
On the other hand, lints may change too fast for this to make sense.