2020-07-11 10:29:35 -04:00
|
|
|
#![warn(unused_attributes)] //~ NOTE lint level is defined here
|
|
|
|
|
|
|
|
|
|
#[link_name = "foo"]
|
2025-08-09 20:41:01 +02:00
|
|
|
//~^ WARN attribute cannot be used on
|
|
|
|
|
//~| WARN previously accepted
|
|
|
|
|
//~| HELP can be applied to
|
2025-08-16 17:13:15 +02:00
|
|
|
//~| HELP remove the attribute
|
2025-08-09 20:41:01 +02:00
|
|
|
struct Foo;
|
2020-06-14 00:47:42 -04:00
|
|
|
|
|
|
|
|
#[link_name = "foobar"]
|
2025-08-09 20:41:01 +02:00
|
|
|
//~^ WARN attribute cannot be used on
|
|
|
|
|
//~| WARN previously accepted
|
|
|
|
|
//~| HELP can be applied to
|
2025-08-16 17:13:15 +02:00
|
|
|
//~| HELP remove the attribute
|
2020-06-14 00:47:42 -04:00
|
|
|
extern "C" {
|
|
|
|
|
fn foo() -> u32;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[link_name]
|
|
|
|
|
//~^ ERROR malformed `link_name` attribute input
|
|
|
|
|
//~| HELP must be of the form
|
2025-08-09 20:41:01 +02:00
|
|
|
//~| WARN attribute cannot be used on
|
|
|
|
|
//~| WARN previously accepted
|
2025-08-16 17:13:15 +02:00
|
|
|
//~| HELP remove the attribute
|
2025-08-09 20:41:01 +02:00
|
|
|
//~| HELP can be applied to
|
2025-08-11 17:02:32 +00:00
|
|
|
//~| NOTE for more information, visit
|
2020-06-14 00:47:42 -04:00
|
|
|
extern "C" {
|
|
|
|
|
fn bar() -> u32;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|