blob: 6b4d0dd30e024c92e93e9417f324312e1b4e6b77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#![warn(unused_attributes)] //~ NOTE lint level is defined here
#[link_name = "foo"]
//~^ WARN attribute cannot be used on
//~| WARN previously accepted
//~| HELP can be applied to
//~| HELP remove the attribute
struct Foo;
#[link_name = "foobar"]
//~^ WARN attribute cannot be used on
//~| WARN previously accepted
//~| HELP can be applied to
//~| HELP remove the attribute
extern "C" {
fn foo() -> u32;
}
#[link_name]
//~^ ERROR malformed `link_name` attribute input
//~| HELP must be of the form
//~| WARN attribute cannot be used on
//~| WARN previously accepted
//~| HELP remove the attribute
//~| HELP can be applied to
//~| NOTE for more information, visit
extern "C" {
fn bar() -> u32;
}
fn main() {}
|