1warning: attribute should be applied to a free function, impl method or static 2 --> $DIR/extern-no-mangle.rs:24:5 3 | 4LL | #[no_mangle] 5 | ^^^^^^^^^^^^ 6... 7LL | let x = 0_u8; 8 | ------------- not a free function, impl method or static 9 | 10note: the lint level is defined here 11 --> $DIR/extern-no-mangle.rs:1:9 12 | 13LL | #![warn(unused_attributes)] 14 | ^^^^^^^^^^^^^^^^^ 15 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 16 17warning: `#[no_mangle]` has no effect on a foreign static 18 --> $DIR/extern-no-mangle.rs:11:5 19 | 20LL | #[no_mangle] 21 | ^^^^^^^^^^^^ help: remove this attribute 22... 23LL | 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 29warning: `#[no_mangle]` has no effect on a foreign function 30 --> $DIR/extern-no-mangle.rs:16:5 31 | 32LL | #[no_mangle] 33 | ^^^^^^^^^^^^ help: remove this attribute 34... 35LL | 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 41warning: 3 warnings emitted 42 43