]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/use_self.fixed
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / use_self.fixed
index ac2a1708b65e6e3c409467fd754fe38e82fb59e9..73666f2faae8ed1480626706a1a21c8004eef2c9 100644 (file)
@@ -112,6 +112,12 @@ mod traits {
         }
     }
 
+    impl Clone for Bad {
+        fn clone(&self) -> Self {
+            Self
+        }
+    }
+
     #[derive(Default)]
     struct Good;
 
@@ -171,15 +177,6 @@ mod traits {
             Self::default()
         }
     }
-
-    // Check that self arg isn't linted
-    impl Clone for Good {
-        fn clone(&self) -> Self {
-            // Note: Not linted and it wouldn't be valid
-            // because "can't use `Self` as a constructor`"
-            Good
-        }
-    }
 }
 
 mod issue2894 {
@@ -266,7 +263,7 @@ mod nesting {
     enum Enum {
         A,
         B(u64),
-        C { field: bool }
+        C { field: bool },
     }
     impl Enum {
         fn method() {