1 // `#![derive]` raises errors when it occurs at contexts other than ADT
5 //~^ ERROR `derive` may only be applied to structs, enums and unions
7 mod inner { #![derive(Debug)] }
8 //~^ ERROR `derive` may only be applied to structs, enums and unions
11 //~^ ERROR `derive` may only be applied to structs, enums and unions
14 #[derive(Copy, Clone)] // (can't derive Debug for unions)
24 //~^ ERROR `derive` may only be applied to structs, enums and unions
28 //~^ ERROR `derive` may only be applied to structs, enums and unions