]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/wrong_self_convention2.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / wrong_self_convention2.rs
index dd3e842c9251d7e24b77c4a5c62f27a7944bc2dd..0dcf4743e8b8dbcd1186b794a9f2846a763a2da2 100644 (file)
@@ -1,4 +1,3 @@
-// edition:2018
 #![warn(clippy::wrong_self_convention)]
 #![allow(dead_code)]
 
@@ -87,3 +86,31 @@ fn deref(&self) -> &T {
         }
     }
 }
+
+// don't trigger
+mod issue4546 {
+    use std::pin::Pin;
+
+    struct S;
+    impl S {
+        pub fn as_mut(self: Pin<&mut Self>) {}
+
+        pub fn as_other_thingy(self: Pin<&Self>) {}
+
+        pub fn is_other_thingy(self: Pin<&Self>) {}
+
+        pub fn to_mut(self: Pin<&mut Self>) {}
+
+        pub fn to_other_thingy(self: Pin<&Self>) {}
+    }
+}
+
+mod issue_8480_8513 {
+    struct Cat(String);
+
+    impl Cat {
+        fn is_animal(&mut self) -> bool {
+            todo!();
+        }
+    }
+}