]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/lint_without_lint_pass.rs
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / lint_without_lint_pass.rs
index 1f2fcd8faf61518e75e78eec54092f4116abef6b..81b639848915a3d74fd6ff519051a5a3cb02eaf6 100644 (file)
@@ -3,7 +3,7 @@
 
 #[macro_use]
 extern crate rustc;
-use rustc::lint;
+use rustc::lint::{LintArray, LintPass};
 
 #[macro_use]
 extern crate clippy_lints;
 }
 
 pub struct Pass;
-impl lint::LintPass for Pass {
-    fn get_lints(&self) -> lint::LintArray {
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
         lint_array!(TEST_LINT_REGISTERED)
     }
+
+    fn name(&self) -> &'static str {
+        "TEST_LINT"
+    }
 }
 
+declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
+
+pub struct Pass3;
+impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED]);
+
 fn main() {}