pub struct Lint {
pub name: &'static str,
pub default_level: Level,
pub desc: &'static str,
}
Specification of a single lint.
Fields
name | A string identifier for the lint.
This identifies the lint in attributes and in command-line arguments.
In those contexts it is always lowercase, but this field is compared
in a way which is case-insensitive for ASCII characters. This allows
declare_lint!() invocations to follow the convention of upper-case
statics without repeating the name.
The name is written with underscores, e.g. "unused_imports".
On the command line, underscores become dashes.
|
default_level | Default level for the lint.
|
desc | Description of the lint or the issue it detects.
e.g. "imports that are never used"
|
Methods
Get the lint's name, with ASCII letters converted to lowercase.
Trait Implementations
Derived Implementations
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).