]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/unsafe_removed_from_name.rs
Auto merge of #4551 - mikerite:fix-ice-reporting, r=llogiq
[rust.git] / clippy_lints / src / unsafe_removed_from_name.rs
index 68ceaaac8a31432416cb38c6540494c13357221b..deeeefb88ab5770671eeb0e57ade8c0d1f915e25 100644 (file)
@@ -1,6 +1,6 @@
 use crate::utils::span_lint;
 use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
-use rustc::{declare_tool_lint, lint_array};
+use rustc::{declare_lint_pass, declare_tool_lint};
 use syntax::ast::*;
 use syntax::source_map::Span;
 use syntax::symbol::LocalInternedString;
     "`unsafe` removed from API names on import"
 }
 
-pub struct UnsafeNameRemoval;
-
-impl LintPass for UnsafeNameRemoval {
-    fn get_lints(&self) -> LintArray {
-        lint_array!(UNSAFE_REMOVED_FROM_NAME)
-    }
-
-    fn name(&self) -> &'static str {
-        "UnsafeNameRemoval"
-    }
-}
+declare_lint_pass!(UnsafeNameRemoval => [UNSAFE_REMOVED_FROM_NAME]);
 
 impl EarlyLintPass for UnsafeNameRemoval {
     fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) {