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