]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-47725.rs
rustdoc: Remove unused Clean impls
[rust.git] / src / test / ui / issues / issue-47725.rs
1 #![warn(unused_attributes)] //~ NOTE lint level is defined here
2
3 #[link_name = "foo"]
4 //~^ WARN attribute should be applied to a foreign function or static [unused_attributes]
5 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
6 struct Foo; //~ NOTE not a foreign function or static
7
8 #[link_name = "foobar"]
9 //~^ WARN attribute should be applied to a foreign function or static [unused_attributes]
10 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
11 //~| HELP try `#[link(name = "foobar")]` instead
12 extern "C" {
13     fn foo() -> u32;
14 }
15 //~^^^ NOTE not a foreign function or static
16
17 #[link_name]
18 //~^ ERROR malformed `link_name` attribute input
19 //~| HELP must be of the form
20 //~| WARN attribute should be applied to a foreign function or static [unused_attributes]
21 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22 //~| HELP try `#[link(name = "...")]` instead
23 extern "C" {
24     fn bar() -> u32;
25 }
26 //~^^^ NOTE not a foreign function or static
27
28 fn main() {}