]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/macro_use.rs
Replace `#[allow]` with `#[expect]` in Clippy
[rust.git] / clippy_lints / src / macro_use.rs
index ca1ccb93bf3fbeea048a54fda55a0070aba819ab..da806918be06113ef42f6b40640e1510b60ca3b4 100644 (file)
@@ -35,7 +35,8 @@ struct PathAndSpan {
     span: Span,
 }
 
-/// `MacroRefData` includes the name of the macro.
+/// `MacroRefData` includes the name of the macro
+/// and the path from `SourceMap::span_to_filename`.
 #[derive(Debug, Clone)]
 pub struct MacroRefData {
     name: String,
@@ -48,7 +49,7 @@ pub fn new(name: String) -> Self {
 }
 
 #[derive(Default)]
-#[allow(clippy::module_name_repetitions)]
+#[expect(clippy::module_name_repetitions)]
 pub struct MacroUseImports {
     /// the actual import path used and the span of the attribute above it.
     imports: Vec<(String, Span)>,
@@ -134,7 +135,6 @@ fn check_ty(&mut self, cx: &LateContext<'_>, ty: &hir::Ty<'_>) {
             self.push_unique_macro_pat_ty(cx, ty.span);
         }
     }
-    #[allow(clippy::too_many_lines)]
     fn check_crate_post(&mut self, cx: &LateContext<'_>) {
         let mut used = FxHashMap::default();
         let mut check_dup = vec![];