]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/extern-no-mangle.stderr
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / extern / extern-no-mangle.stderr
1 warning: attribute should be applied to a free function, impl method or static
2   --> $DIR/extern-no-mangle.rs:24:5
3    |
4 LL |     #[no_mangle]
5    |     ^^^^^^^^^^^^
6 ...
7 LL |     let x = 0_u8;
8    |     ------------- not a free function, impl method or static
9    |
10    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
11 note: the lint level is defined here
12   --> $DIR/extern-no-mangle.rs:1:9
13    |
14 LL | #![warn(unused_attributes)]
15    |         ^^^^^^^^^^^^^^^^^
16
17 warning: `#[no_mangle]` has no effect on a foreign static
18   --> $DIR/extern-no-mangle.rs:11:5
19    |
20 LL |     #[no_mangle]
21    |     ^^^^^^^^^^^^ help: remove this attribute
22 ...
23 LL |     pub static FOO: u8;
24    |     ------------------- foreign static
25    |
26    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27    = note: symbol names in extern blocks are not mangled
28
29 warning: `#[no_mangle]` has no effect on a foreign function
30   --> $DIR/extern-no-mangle.rs:16:5
31    |
32 LL |     #[no_mangle]
33    |     ^^^^^^^^^^^^ help: remove this attribute
34 ...
35 LL |     pub fn bar();
36    |     ------------- foreign function
37    |
38    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39    = note: symbol names in extern blocks are not mangled
40
41 warning: 3 warnings emitted
42