about summary refs log tree commit diff
path: root/tests/ui/derive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/derive.rs')
-rw-r--r--tests/ui/derive.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/derive.rs b/tests/ui/derive.rs
index ff4dcbfa2f2..07df50f4661 100644
--- a/tests/ui/derive.rs
+++ b/tests/ui/derive.rs
@@ -9,6 +9,7 @@
 struct Qux;
 
 impl Clone for Qux {
+    //~^ ERROR: you are implementing `Clone` explicitly on a `Copy` type
     fn clone(&self) -> Self {
         Qux
     }
@@ -33,6 +34,7 @@ struct Lt<'a> {
 }
 
 impl<'a> Clone for Lt<'a> {
+    //~^ ERROR: you are implementing `Clone` explicitly on a `Copy` type
     fn clone(&self) -> Self {
         unimplemented!()
     }
@@ -44,6 +46,7 @@ struct BigArray {
 }
 
 impl Clone for BigArray {
+    //~^ ERROR: you are implementing `Clone` explicitly on a `Copy` type
     fn clone(&self) -> Self {
         unimplemented!()
     }
@@ -55,6 +58,7 @@ struct FnPtr {
 }
 
 impl Clone for FnPtr {
+    //~^ ERROR: you are implementing `Clone` explicitly on a `Copy` type
     fn clone(&self) -> Self {
         unimplemented!()
     }
@@ -75,6 +79,7 @@ impl<T> Clone for Generic<T> {
 #[derive(Copy)]
 struct Generic2<T>(T);
 impl<T: Clone> Clone for Generic2<T> {
+    //~^ ERROR: you are implementing `Clone` explicitly on a `Copy` type
     fn clone(&self) -> Self {
         Self(self.0.clone())
     }