]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/issue-43023.rs
New upstream version 1.22.1+dfsg1
[rustc.git] / src / test / compile-fail / issue-43023.rs
index 55a3b2f8ce3a12bc494eaaafe1392bbc2e012dc0..6a5f7a1136aaa7b4b6a8e119d986e34792313928 100644 (file)
 struct S;
 
 impl S {
-    #[derive(Debug)] //~ ERROR `derive` may only be applied to structs and enums
+    #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions
     fn f() {
         file!();
     }
 }
 
 trait Tr1 {
-    #[derive(Debug)] //~ ERROR `derive` may only be applied to structs and enums
+    #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions
     fn f();
 }
 
 trait Tr2 {
-    #[derive(Debug)] //~ ERROR `derive` may only be applied to structs and enums
+    #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions
     type F;
 }