Files
rust/tests/ui/extern/issue-47725.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
721 B
Rust
Raw Normal View History

#![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
2025-08-16 17:13:15 +02:00
//~| HELP remove the attribute
struct Foo;
2020-06-14 00:47:42 -04:00
#[link_name = "foobar"]
//~^ 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
//~| WARN attribute cannot be used on
//~| WARN previously accepted
2025-08-16 17:13:15 +02:00
//~| HELP remove the attribute
//~| HELP can be applied to
//~| NOTE for more information, visit
2020-06-14 00:47:42 -04:00
extern "C" {
fn bar() -> u32;
}
fn main() {}