]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/needless_arbitrary_self_type.rs
Auto merge of #6336 - giraffate:sync-from-rust, r=flip1995
[rust.git] / tests / ui / needless_arbitrary_self_type.rs
index da4bbcf4a7d71dfe1fdb02ff071298a0155e8359..17aeaaf97ac73ab792661dc03cf95f14035746f3 100644 (file)
@@ -1,4 +1,7 @@
+// run-rustfix
+
 #![warn(clippy::needless_arbitrary_self_type)]
+#![allow(unused_mut, clippy::needless_lifetimes)]
 
 pub enum ValType {
     A,
@@ -26,11 +29,15 @@ pub fn ref_bad(self: &Self) {
         unimplemented!();
     }
 
+    pub fn ref_good(&self) {
+        unimplemented!();
+    }
+
     pub fn ref_bad_with_lifetime<'a>(self: &'a Self) {
         unimplemented!();
     }
 
-    pub fn ref_good(&self) {
+    pub fn ref_good_with_lifetime<'a>(&'a self) {
         unimplemented!();
     }
 
@@ -38,15 +45,19 @@ pub fn mut_ref_bad(self: &mut Self) {
         unimplemented!();
     }
 
+    pub fn mut_ref_good(&mut self) {
+        unimplemented!();
+    }
+
     pub fn mut_ref_bad_with_lifetime<'a>(self: &'a mut Self) {
         unimplemented!();
     }
 
-    pub fn mut_ref_good(&mut self) {
+    pub fn mut_ref_good_with_lifetime<'a>(&'a mut self) {
         unimplemented!();
     }
 
-    pub fn mut_ref_mut_bad(mut self: &mut Self) {
+    pub fn mut_ref_mut_good(mut self: &mut Self) {
         unimplemented!();
     }