2018-10-12 01:09:04 -05:00
|
|
|
#![deny(clippy::internal)]
|
2021-11-11 05:54:53 -06:00
|
|
|
#![allow(clippy::missing_clippy_version_attribute)]
|
2018-10-12 01:09:04 -05:00
|
|
|
#![feature(rustc_private)]
|
|
|
|
|
|
|
|
#[macro_use]
|
2020-03-30 04:02:14 -05:00
|
|
|
extern crate rustc_middle;
|
2019-12-03 17:16:03 -06:00
|
|
|
#[macro_use]
|
|
|
|
extern crate rustc_session;
|
2020-01-12 00:08:41 -06:00
|
|
|
extern crate rustc_lint;
|
2020-02-11 08:20:47 -06:00
|
|
|
use rustc_lint::LintPass;
|
2018-10-12 01:09:04 -05:00
|
|
|
|
2019-11-07 14:48:22 -06:00
|
|
|
declare_tool_lint! {
|
|
|
|
pub clippy::TEST_LINT,
|
|
|
|
Warn,
|
|
|
|
"",
|
|
|
|
report_in_external_macro: true
|
2018-10-12 01:09:04 -05:00
|
|
|
}
|
|
|
|
|
2019-11-07 14:48:22 -06:00
|
|
|
declare_tool_lint! {
|
|
|
|
pub clippy::TEST_LINT_REGISTERED,
|
|
|
|
Warn,
|
|
|
|
"",
|
|
|
|
report_in_external_macro: true
|
2018-10-29 14:37:47 -05:00
|
|
|
}
|
|
|
|
|
2019-11-07 14:48:22 -06:00
|
|
|
declare_tool_lint! {
|
|
|
|
pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
|
|
|
|
Warn,
|
|
|
|
"",
|
|
|
|
report_in_external_macro: true
|
2019-10-24 06:54:18 -05:00
|
|
|
}
|
|
|
|
|
2018-10-29 14:37:47 -05:00
|
|
|
pub struct Pass;
|
2019-04-16 17:21:12 -05:00
|
|
|
impl LintPass for Pass {
|
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;
|
2019-10-24 06:54:18 -05:00
|
|
|
impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED_ONLY_IMPL]);
|
2019-04-16 17:21:12 -05:00
|
|
|
|
2018-12-09 16:26:16 -06:00
|
|
|
fn main() {}
|