2018-10-12 01:09:04 -05:00
|
|
|
#![deny(clippy::internal)]
|
|
|
|
#![feature(rustc_private)]
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate rustc;
|
2019-04-16 17:21:12 -05:00
|
|
|
use rustc::lint::{LintArray, LintPass};
|
2018-10-12 01:09:04 -05:00
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate clippy_lints;
|
|
|
|
|
2018-10-29 14:37:47 -05:00
|
|
|
declare_clippy_lint! {
|
2018-10-12 01:09:04 -05:00
|
|
|
pub TEST_LINT,
|
|
|
|
correctness,
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
2018-10-29 14:37:47 -05:00
|
|
|
declare_clippy_lint! {
|
|
|
|
pub TEST_LINT_REGISTERED,
|
|
|
|
correctness,
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Pass;
|
2019-04-16 17:21:12 -05:00
|
|
|
impl LintPass for Pass {
|
|
|
|
fn get_lints(&self) -> LintArray {
|
2018-10-29 14:37:47 -05:00
|
|
|
lint_array!(TEST_LINT_REGISTERED)
|
|
|
|
}
|
2019-01-26 13:40:55 -06:00
|
|
|
|
|
|
|
fn name(&self) -> &'static str {
|
|
|
|
"TEST_LINT"
|
|
|
|
}
|
2018-10-29 14:37:47 -05:00
|
|
|
}
|
|
|
|
|
2019-04-16 17:21:12 -05:00
|
|
|
declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
|
|
|
|
|
|
|
|
pub struct Pass3;
|
|
|
|
impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED]);
|
|
|
|
|
2018-12-09 16:26:16 -06:00
|
|
|
fn main() {}
|