fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.7 KiB60 linesraw
1error: malformed `link_name` attribute input
2  --> $DIR/issue-47725.rs:17:1
3   |
4LL | #[link_name]
5   | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
6
7warning: attribute should be applied to a foreign function or static
8  --> $DIR/issue-47725.rs:3:1
9   |
10LL | #[link_name = "foo"]
11   | ^^^^^^^^^^^^^^^^^^^^
12...
13LL | struct Foo;
14   | ----------- not a foreign function or static
15   |
16   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
17note: the lint level is defined here
18  --> $DIR/issue-47725.rs:1:9
19   |
20LL | #![warn(unused_attributes)]
21   |         ^^^^^^^^^^^^^^^^^
22
23warning: attribute should be applied to a foreign function or static
24  --> $DIR/issue-47725.rs:8:1
25   |
26LL |   #[link_name = "foobar"]
27   |   ^^^^^^^^^^^^^^^^^^^^^^^
28...
29LL | / extern "C" {
30LL | |     fn foo() -> u32;
31LL | | }
32   | |_- not a foreign function or static
33   |
34   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35help: try `#[link(name = "foobar")]` instead
36  --> $DIR/issue-47725.rs:8:1
37   |
38LL | #[link_name = "foobar"]
39   | ^^^^^^^^^^^^^^^^^^^^^^^
40
41warning: attribute should be applied to a foreign function or static
42  --> $DIR/issue-47725.rs:17:1
43   |
44LL |   #[link_name]
45   |   ^^^^^^^^^^^^
46...
47LL | / extern "C" {
48LL | |     fn bar() -> u32;
49LL | | }
50   | |_- not a foreign function or static
51   |
52   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
53help: try `#[link(name = "...")]` instead
54  --> $DIR/issue-47725.rs:17:1
55   |
56LL | #[link_name]
57   | ^^^^^^^^^^^^
58
59error: aborting due to previous error; 3 warnings emitted
60