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