1
Fork 0

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:
blyxyas 2023-11-13 14:35:37 +01:00
parent c926476d01
commit b4da058595
45 changed files with 264 additions and 50 deletions

View file

@ -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! {