fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: declaration of a `no_mangle` function 2 --> $DIR/lint-unsafe-code.rs:31:1 3 | 4LL | #[no_mangle] fn foo() {} 5 | ^^^^^^^^^^^^ 6 | 7 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 8note: the lint level is defined here 9 --> $DIR/lint-unsafe-code.rs:3:9 10 | 11LL | #![deny(unsafe_code)] 12 | ^^^^^^^^^^^ 13 14error: declaration of a `no_mangle` static 15 --> $DIR/lint-unsafe-code.rs:32:1 16 | 17LL | #[no_mangle] static FOO: u32 = 5; 18 | ^^^^^^^^^^^^ 19 | 20 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 21 22error: declaration of a `no_mangle` method 23 --> $DIR/lint-unsafe-code.rs:41:5 24 | 25LL | #[no_mangle] fn foo() {} 26 | ^^^^^^^^^^^^ 27 | 28 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 29 30error: declaration of a `no_mangle` method 31 --> $DIR/lint-unsafe-code.rs:45:5 32 | 33LL | #[no_mangle] fn foo() {} 34 | ^^^^^^^^^^^^ 35 | 36 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 37 38error: declaration of a function with `export_name` 39 --> $DIR/lint-unsafe-code.rs:48:1 40 | 41LL | #[export_name = "bar"] fn bar() {} 42 | ^^^^^^^^^^^^^^^^^^^^^^ 43 | 44 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 45 46error: declaration of a static with `export_name` 47 --> $DIR/lint-unsafe-code.rs:49:1 48 | 49LL | #[export_name = "BAR"] static BAR: u32 = 5; 50 | ^^^^^^^^^^^^^^^^^^^^^^ 51 | 52 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 53 54error: declaration of a function with `link_section` 55 --> $DIR/lint-unsafe-code.rs:51:1 56 | 57LL | #[link_section = ".example_section"] fn uwu() {} 58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 59 | 60 = note: the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them 61 62error: declaration of a static with `link_section` 63 --> $DIR/lint-unsafe-code.rs:52:1 64 | 65LL | #[link_section = ".example_section"] static UWU: u32 = 5; 66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 67 | 68 = note: the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them 69 70error: declaration of a method with `export_name` 71 --> $DIR/lint-unsafe-code.rs:57:5 72 | 73LL | #[export_name = "bar"] fn bar() {} 74 | ^^^^^^^^^^^^^^^^^^^^^^ 75 | 76 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 77 78error: declaration of a method with `export_name` 79 --> $DIR/lint-unsafe-code.rs:61:5 80 | 81LL | #[export_name = "bar"] fn foo() {} 82 | ^^^^^^^^^^^^^^^^^^^^^^ 83 | 84 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 85 86error: declaration of an `unsafe` function 87 --> $DIR/lint-unsafe-code.rs:64:1 88 | 89LL | unsafe fn baz() {} 90 | ^^^^^^^^^^^^^^^^^^ 91 92error: declaration of an `unsafe` trait 93 --> $DIR/lint-unsafe-code.rs:65:1 94 | 95LL | unsafe trait Foo {} 96 | ^^^^^^^^^^^^^^^^^^^ 97 98error: implementation of an `unsafe` trait 99 --> $DIR/lint-unsafe-code.rs:66:1 100 | 101LL | unsafe impl Foo for Bar {} 102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 103 104error: declaration of an `unsafe` method 105 --> $DIR/lint-unsafe-code.rs:69:5 106 | 107LL | unsafe fn baz(&self); 108 | ^^^^^^^^^^^^^^^^^^^^^ 109 110error: implementation of an `unsafe` method 111 --> $DIR/lint-unsafe-code.rs:70:5 112 | 113LL | unsafe fn provided(&self) {} 114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 115 116error: implementation of an `unsafe` method 117 --> $DIR/lint-unsafe-code.rs:71:5 118 | 119LL | unsafe fn provided_override(&self) {} 120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 121 122error: implementation of an `unsafe` method 123 --> $DIR/lint-unsafe-code.rs:75:5 124 | 125LL | unsafe fn baz(&self) {} 126 | ^^^^^^^^^^^^^^^^^^^^^^^ 127 128error: implementation of an `unsafe` method 129 --> $DIR/lint-unsafe-code.rs:76:5 130 | 131LL | unsafe fn provided_override(&self) {} 132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 133 134error: implementation of an `unsafe` method 135 --> $DIR/lint-unsafe-code.rs:95:5 136 | 137LL | unsafe fn provided_override(&self) {} 138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 139 140error: implementation of an `unsafe` method 141 --> $DIR/lint-unsafe-code.rs:106:5 142 | 143LL | unsafe fn provided(&self) {} 144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 145 146error: implementation of an `unsafe` method 147 --> $DIR/lint-unsafe-code.rs:112:5 148 | 149LL | unsafe fn provided(&self) {} 150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 151 152error: implementation of an `unsafe` method 153 --> $DIR/lint-unsafe-code.rs:116:5 154 | 155LL | unsafe fn baz(&self) {} 156 | ^^^^^^^^^^^^^^^^^^^^^^^ 157 158error: usage of an `unsafe` block 159 --> $DIR/lint-unsafe-code.rs:127:5 160 | 161LL | unsafe {} 162 | ^^^^^^^^^ 163 164error: declaration of a `no_mangle` function 165 --> $DIR/lint-unsafe-code.rs:21:9 166 | 167LL | #[no_mangle] fn foo() {} 168 | ^^^^^^^^^^^^ 169... 170LL | unsafe_in_macro!() 171 | ------------------ in this macro invocation 172 | 173 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 174 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) 175 176error: declaration of a `no_mangle` static 177 --> $DIR/lint-unsafe-code.rs:22:9 178 | 179LL | #[no_mangle] static FOO: u32 = 5; 180 | ^^^^^^^^^^^^ 181... 182LL | unsafe_in_macro!() 183 | ------------------ in this macro invocation 184 | 185 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 186 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) 187 188error: declaration of a function with `export_name` 189 --> $DIR/lint-unsafe-code.rs:23:9 190 | 191LL | #[export_name = "bar"] fn bar() {} 192 | ^^^^^^^^^^^^^^^^^^^^^^ 193... 194LL | unsafe_in_macro!() 195 | ------------------ in this macro invocation 196 | 197 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 198 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) 199 200error: declaration of a static with `export_name` 201 --> $DIR/lint-unsafe-code.rs:25:9 202 | 203LL | #[export_name = "BAR"] static BAR: u32 = 5; 204 | ^^^^^^^^^^^^^^^^^^^^^^ 205... 206LL | unsafe_in_macro!() 207 | ------------------ in this macro invocation 208 | 209 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them 210 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) 211 212error: usage of an `unsafe` block 213 --> $DIR/lint-unsafe-code.rs:27:9 214 | 215LL | unsafe {} 216 | ^^^^^^^^^ 217... 218LL | unsafe_in_macro!() 219 | ------------------ in this macro invocation 220 | 221 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) 222 223error: aborting due to 28 previous errors 224