]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/unsafe_removed_from_name.rs
Rollup merge of #83092 - petrochenkov:qspan, r=estebank
[rust.git] / clippy_lints / src / unsafe_removed_from_name.rs
index e4b0a37739699fd8f0a9378d3767f2cf28a2e63c..154082a0fdb530b8e81d1d4e47f3abced3f96b6b 100644 (file)
@@ -1,10 +1,9 @@
 use crate::utils::span_lint;
-use rustc::declare_lint_pass;
-use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
-use rustc_session::declare_tool_lint;
+use rustc_ast::ast::{Item, ItemKind, UseTree, UseTreeKind};
+use rustc_lint::{EarlyContext, EarlyLintPass};
+use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::source_map::Span;
-use rustc_span::symbol::SymbolStr;
-use syntax::ast::*;
+use rustc_span::symbol::Ident;
 
 declare_clippy_lint! {
     /// **What it does:** Checks for imports that remove "unsafe" from an item's
@@ -66,7 +65,7 @@ fn unsafe_to_safe_check(old_name: Ident, new_name: Ident, cx: &EarlyContext<'_>,
             UNSAFE_REMOVED_FROM_NAME,
             span,
             &format!(
-                "removed \"unsafe\" from the name of `{}` in use as `{}`",
+                "removed `unsafe` from the name of `{}` in use as `{}`",
                 old_str, new_str
             ),
         );
@@ -74,6 +73,6 @@ fn unsafe_to_safe_check(old_name: Ident, new_name: Ident, cx: &EarlyContext<'_>,
 }
 
 #[must_use]
-fn contains_unsafe(name: &SymbolStr) -> bool {
+fn contains_unsafe(name: &str) -> bool {
     name.contains("Unsafe") || name.contains("unsafe")
 }