]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint_without_lint_pass.rs
Auto merge of #4478 - tsurai:master, r=flip1995
[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 use rustc::lint::{LintArray, LintPass};
7
8 #[macro_use]
9 extern crate clippy_lints;
10
11 declare_clippy_lint! {
12     pub TEST_LINT,
13     correctness,
14     ""
15 }
16
17 declare_clippy_lint! {
18     pub TEST_LINT_REGISTERED,
19     correctness,
20     ""
21 }
22
23 pub struct Pass;
24 impl LintPass for Pass {
25     fn get_lints(&self) -> LintArray {
26         lint_array!(TEST_LINT_REGISTERED)
27     }
28
29     fn name(&self) -> &'static str {
30         "TEST_LINT"
31     }
32 }
33
34 declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
35
36 pub struct Pass3;
37 impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED]);
38
39 fn main() {}