]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint_without_lint_pass.rs
Rollup merge of #4820 - guanqun:comment-fix, 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 declare_tool_lint! {
9     pub clippy::TEST_LINT,
10     Warn,
11     "",
12     report_in_external_macro: true
13 }
14
15 declare_tool_lint! {
16     pub clippy::TEST_LINT_REGISTERED,
17     Warn,
18     "",
19     report_in_external_macro: true
20 }
21
22 declare_tool_lint! {
23     pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
24     Warn,
25     "",
26     report_in_external_macro: true
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() {}