1 // ignore-tidy-linelength
2 #![warn(unused_attributes)] //~ NOTE lint level is defined here
5 //~^ WARN attribute should be applied to a foreign function or static [unused_attributes]
6 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
7 struct Foo; //~ NOTE not a foreign function or static
9 #[link_name = "foobar"]
10 //~^ WARN attribute should be applied to a foreign function or static [unused_attributes]
11 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
12 //~| HELP try `#[link(name = "foobar")]` instead
16 //~^^^ NOTE not a foreign function or static
19 //~^ ERROR malformed `link_name` attribute input
20 //~| HELP must be of the form
21 //~| WARN attribute should be applied to a foreign function or static [unused_attributes]
22 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23 //~| HELP try `#[link(name = "...")]` instead
27 //~^^^ NOTE not a foreign function or static