]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/attrs.rs
Auto merge of #89123 - the8472:push_in_capacity, r=amanieu
[rust.git] / src / tools / clippy / clippy_lints / src / attrs.rs
index 732dc2b433091b047abdffa296f7521ebbd7e3e9..0bd1f8b784e8f3f5552c79c2af82a4c23a5c46fa 100644 (file)
@@ -357,7 +357,8 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
                                                     "wildcard_imports"
                                                         | "enum_glob_use"
                                                         | "redundant_pub_crate"
-                                                        | "macro_use_imports",
+                                                        | "macro_use_imports"
+                                                        | "unsafe_removed_from_name",
                                                 )
                                             })
                                         {
@@ -541,10 +542,7 @@ fn check_attrs(cx: &LateContext<'_>, span: Span, name: Symbol, attrs: &[Attribut
                     cx,
                     INLINE_ALWAYS,
                     attr.span,
-                    &format!(
-                        "you have declared `#[inline(always)]` on `{}`. This is usually a bad idea",
-                        name
-                    ),
+                    &format!("you have declared `#[inline(always)]` on `{name}`. This is usually a bad idea"),
                 );
             }
         }
@@ -720,7 +718,7 @@ fn find_mismatched_target_os(items: &[NestedMetaItem]) -> Vec<(&str, Span)> {
                 let mut unix_suggested = false;
 
                 for (os, span) in mismatched {
-                    let sugg = format!("target_os = \"{}\"", os);
+                    let sugg = format!("target_os = \"{os}\"");
                     diag.span_suggestion(span, "try", sugg, Applicability::MaybeIncorrect);
 
                     if !unix_suggested && is_unix(os) {