]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/same_name_method.rs
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / same_name_method.rs
index 12e10ba6c493b8c9e539ce2b1e7b33faa4d285e8..9562b47f0c4ff28610caf5f78856225725642d77 100644 (file)
@@ -1,3 +1,4 @@
+#![feature(lint_reasons)]
 #![warn(clippy::same_name_method)]
 #![allow(dead_code, non_camel_case_types)]
 
@@ -108,4 +109,19 @@ impl T3 for S {
     }
 }
 
+mod check_expect_suppression {
+    use crate::T1;
+
+    struct S;
+
+    impl S {
+        #[expect(clippy::same_name_method)]
+        fn foo() {}
+    }
+
+    impl T1 for S {
+        fn foo() {}
+    }
+}
+
 fn main() {}