]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint_without_lint_pass.rs
Merge remote-tracking branch 'upstream/rust-1.38.0' into backport_merge
[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 declare_clippy_lint! {
24     pub TEST_LINT_REGISTERED_ONLY_IMPL,
25     correctness,
26     ""
27 }
28
29 pub struct Pass;
30 impl LintPass for Pass {
31     fn name(&self) -> &'static str {
32         "TEST_LINT"
33     }
34 }
35
36 declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
37
38 pub struct Pass3;
39 impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED_ONLY_IMPL]);
40
41 fn main() {}