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