]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint_without_lint_pass.rs
iterate List by value
[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_middle;
6 #[macro_use]
7 extern crate rustc_session;
8 extern crate rustc_lint;
9 use rustc_lint::LintPass;
10
11 declare_tool_lint! {
12     pub clippy::TEST_LINT,
13     Warn,
14     "",
15     report_in_external_macro: true
16 }
17
18 declare_tool_lint! {
19     pub clippy::TEST_LINT_REGISTERED,
20     Warn,
21     "",
22     report_in_external_macro: true
23 }
24
25 declare_tool_lint! {
26     pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
27     Warn,
28     "",
29     report_in_external_macro: true
30 }
31
32 pub struct Pass;
33 impl LintPass for Pass {
34     fn name(&self) -> &'static str {
35         "TEST_LINT"
36     }
37 }
38
39 declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
40
41 pub struct Pass3;
42 impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED_ONLY_IMPL]);
43
44 fn main() {}