refactor(test): Move attribute to lint level

This commit is contained in:
Raghul Nanth A 2023-06-02 23:56:30 +05:30
parent 7ac15f9000
commit 50c93bbfd2
2 changed files with 11 additions and 22 deletions

View file

@ -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() {}

View file

@ -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() {}