1 #![feature(stmt_expr_attributes)]
6 #[derive(Debug)] // should not warn
10 #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
11 println!("Hello, world!");
14 #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
18 #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
19 let _ = "Hello, world!";
22 let _ = #[derive(Debug)] "Hello, world!";
23 //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
27 #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s