mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
refactor(test): Move attribute to lint level
This commit is contained in:
parent
7ac15f9000
commit
50c93bbfd2
2 changed files with 11 additions and 22 deletions
|
@ -1,22 +0,0 @@
|
|||
#![allow(clippy::almost_standard_lint_formulation)]
|
||||
#![feature(rustc_private)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_middle;
|
||||
#[macro_use]
|
||||
extern crate rustc_session;
|
||||
extern crate rustc_lint;
|
||||
|
||||
declare_tool_lint! {
|
||||
/// # What it does
|
||||
/// Detects uses of incorrect formulations
|
||||
#[clippy::version = "pre 1.29.0"]
|
||||
pub clippy::ALLOWED_INVALID,
|
||||
Warn,
|
||||
"One",
|
||||
report_in_external_macro: true
|
||||
}
|
||||
|
||||
declare_lint_pass!(Pass => [ALLOWED_INVALID]);
|
||||
|
||||
fn main() {}
|
|
@ -38,6 +38,17 @@ declare_tool_lint! {
|
|||
report_in_external_macro: true
|
||||
}
|
||||
|
||||
declare_tool_lint! {
|
||||
/// # What it does
|
||||
/// Detects uses of incorrect formulations (allowed with attribute)
|
||||
#[allow(clippy::almost_standard_lint_formulation)]
|
||||
#[clippy::version = "pre 1.29.0"]
|
||||
pub clippy::ALLOWED_INVALID,
|
||||
Warn,
|
||||
"One",
|
||||
report_in_external_macro: true
|
||||
}
|
||||
|
||||
declare_lint_pass!(Pass => [VALID, INVALID1, INVALID2]);
|
||||
|
||||
fn main() {}
|
||||
|
|
Loading…
Add table
Reference in a new issue