Do not run lints that cannot emit
Before this change, adding a lint was a difficult matter because it always had some overhead involved. This was because all lints would run, no matter their default level, or if the user had #![allow]ed them. This PR changes that
This commit is contained in:
parent
c926476d01
commit
b4da058595
45 changed files with 264 additions and 50 deletions
|
@ -378,7 +378,8 @@ declare_lint! {
|
|||
/// will not overflow.
|
||||
pub ARITHMETIC_OVERFLOW,
|
||||
Deny,
|
||||
"arithmetic operation overflows"
|
||||
"arithmetic operation overflows",
|
||||
[loadbearing: true]
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
|
@ -633,7 +634,8 @@ declare_lint! {
|
|||
/// is only available in a newer version.
|
||||
pub UNKNOWN_LINTS,
|
||||
Warn,
|
||||
"unrecognized lint attribute"
|
||||
"unrecognized lint attribute",
|
||||
[loadbearing: true]
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue