Rollup merge of #94274 - djkoloski:unknown_unstable_lints, r=tmandry
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:
commit
1ed2a94fd2
21 changed files with 383 additions and 114 deletions
|
@ -3128,6 +3128,7 @@ declare_lint_pass! {
|
|||
SUSPICIOUS_AUTO_TRAIT_IMPLS,
|
||||
UNEXPECTED_CFGS,
|
||||
DEPRECATED_WHERE_CLAUSE_LOCATION,
|
||||
TEST_UNSTABLE_LINT,
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3771,3 +3772,25 @@ declare_lint! {
|
|||
Warn,
|
||||
"deprecated where clause location"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
/// The `test_unstable_lint` lint tests unstable lints and is perma-unstable.
|
||||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```
|
||||
/// #![allow(test_unstable_lint)]
|
||||
/// ```
|
||||
///
|
||||
/// {{produces}}
|
||||
///
|
||||
/// ### Explanation
|
||||
///
|
||||
/// In order to test the behavior of unstable lints, a permanently-unstable
|
||||
/// lint is required. This lint can be used to trigger warnings and errors
|
||||
/// from the compiler related to unstable lints.
|
||||
pub TEST_UNSTABLE_LINT,
|
||||
Deny,
|
||||
"this unstable lint is only for testing",
|
||||
@feature_gate = sym::test_unstable_lint;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue