]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint_without_lint_pass.rs
Rustup to rust-lang/rust#66878
[rust.git] / tests / ui / lint_without_lint_pass.rs
1 #![deny(clippy::internal)]
2 #![feature(rustc_private)]
3
4 #[macro_use]
5 extern crate rustc;
6 #[macro_use]
7 extern crate rustc_session;
8 use rustc::lint::{LintArray, LintPass};
9
10 declare_tool_lint! {
11     pub clippy::TEST_LINT,
12     Warn,
13     "",
14     report_in_external_macro: true
15 }
16
17 declare_tool_lint! {
18     pub clippy::TEST_LINT_REGISTERED,
19     Warn,
20     "",
21     report_in_external_macro: true
22 }
23
24 declare_tool_lint! {
25     pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
26     Warn,
27     "",
28     report_in_external_macro: true
29 }
30
31 pub struct Pass;
32 impl LintPass for Pass {
33     fn name(&self) -> &'static str {
34         "TEST_LINT"
35     }
36 }
37
38 declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
39
40 pub struct Pass3;
41 impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED_ONLY_IMPL]);
42
43 fn main() {}