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