3 #![feature(stmt_expr_attributes)]
4 #![warn(unused_attributes)] //~ NOTE lint level defined here
6 fn foo<#[derive(Debug)] T>() { //~ WARN unused attribute
8 #[derive(Debug)] //~ WARN unused attribute
16 #[derive(Debug)] // should not warn
21 //~^ WARN `#[derive]` does nothing on macro invocations
22 //~| NOTE this may become a hard error in a future release
23 println!("Hello, world!");
26 #[derive(Debug)] //~ WARN unused attribute
30 #[derive(Debug)] //~ WARN unused attribute
31 let _ = "Hello, world!";
34 let _ = #[derive(Debug)] "Hello, world!";
35 //~^ WARN unused attribute
39 #[derive(Debug)] //~ WARN unused attribute