1
Fork 0

Treat unstable lints as unknown

This change causes unstable lints to be ignored if the `unknown_lints`
lint is allowed. To achieve this, it also changes lints to apply as soon
as they are processed. Previously, lints in the same set were processed
as a batch and then all simultaneously applied.

Implementation of https://github.com/rust-lang/compiler-team/issues/469
This commit is contained in:
David Koloski 2022-02-23 04:53:17 +00:00
parent b97dc20784
commit 8852752078
10 changed files with 119 additions and 35 deletions

View file

@ -3128,6 +3128,7 @@ declare_lint_pass! {
SUSPICIOUS_AUTO_TRAIT_IMPLS,
UNEXPECTED_CFGS,
DEPRECATED_WHERE_CLAUSE_LOCATION,
TEST_UNSTABLE_LINT,
]
}
@ -3771,3 +3772,11 @@ declare_lint! {
Warn,
"deprecated where clause location"
}
declare_lint! {
#[doc(hidden)]
pub TEST_UNSTABLE_LINT,
Deny,
"this unstable lint is only for testing",
@feature_gate = sym::test_unstable_lint;
}