1 // `#![derive]` raises errors when it occurs at contexts other than ADT
5 //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
7 mod inner { #![derive(Debug)] }
8 //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
9 //~| ERROR inner macro attributes are unstable
12 //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
15 #[derive(Copy, Clone)] // (can't derive Debug for unions)
25 //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
29 //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s