1 error: declaration of a `no_mangle` function
2 --> $DIR/lint-unsafe-code.rs:31:1
4 LL | #[no_mangle] fn foo() {}
7 note: the lint level is defined here
8 --> $DIR/lint-unsafe-code.rs:3:9
10 LL | #![deny(unsafe_code)]
12 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
14 error: declaration of a `no_mangle` static
15 --> $DIR/lint-unsafe-code.rs:32:1
17 LL | #[no_mangle] static FOO: u32 = 5;
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
22 error: declaration of a `no_mangle` method
23 --> $DIR/lint-unsafe-code.rs:41:5
25 LL | #[no_mangle] fn foo() {}
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
30 error: declaration of a `no_mangle` method
31 --> $DIR/lint-unsafe-code.rs:45:5
33 LL | #[no_mangle] fn foo() {}
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
38 error: declaration of a function with `export_name`
39 --> $DIR/lint-unsafe-code.rs:48:1
41 LL | #[export_name = "bar"] fn bar() {}
42 | ^^^^^^^^^^^^^^^^^^^^^^
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
46 error: declaration of a static with `export_name`
47 --> $DIR/lint-unsafe-code.rs:49:1
49 LL | #[export_name = "BAR"] static BAR: u32 = 5;
50 | ^^^^^^^^^^^^^^^^^^^^^^
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
54 error: declaration of a function with `link_section`
55 --> $DIR/lint-unsafe-code.rs:51:1
57 LL | #[link_section = ".example_section"] fn uwu() {}
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 = note: the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them
62 error: declaration of a static with `link_section`
63 --> $DIR/lint-unsafe-code.rs:52:1
65 LL | #[link_section = ".example_section"] static UWU: u32 = 5;
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 = note: the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them
70 error: declaration of a method with `export_name`
71 --> $DIR/lint-unsafe-code.rs:57:5
73 LL | #[export_name = "bar"] fn bar() {}
74 | ^^^^^^^^^^^^^^^^^^^^^^
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
78 error: declaration of a method with `export_name`
79 --> $DIR/lint-unsafe-code.rs:61:5
81 LL | #[export_name = "bar"] fn foo() {}
82 | ^^^^^^^^^^^^^^^^^^^^^^
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
86 error: declaration of an `unsafe` function
87 --> $DIR/lint-unsafe-code.rs:64:1
89 LL | unsafe fn baz() {}
92 error: declaration of an `unsafe` trait
93 --> $DIR/lint-unsafe-code.rs:65:1
95 LL | unsafe trait Foo {}
98 error: implementation of an `unsafe` trait
99 --> $DIR/lint-unsafe-code.rs:66:1
101 LL | unsafe impl Foo for Bar {}
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
104 error: declaration of an `unsafe` method
105 --> $DIR/lint-unsafe-code.rs:69:5
107 LL | unsafe fn baz(&self);
108 | ^^^^^^^^^^^^^^^^^^^^^
110 error: implementation of an `unsafe` method
111 --> $DIR/lint-unsafe-code.rs:70:5
113 LL | unsafe fn provided(&self) {}
114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116 error: implementation of an `unsafe` method
117 --> $DIR/lint-unsafe-code.rs:71:5
119 LL | unsafe fn provided_override(&self) {}
120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 error: implementation of an `unsafe` method
123 --> $DIR/lint-unsafe-code.rs:75:5
125 LL | unsafe fn baz(&self) {}
126 | ^^^^^^^^^^^^^^^^^^^^^^^
128 error: implementation of an `unsafe` method
129 --> $DIR/lint-unsafe-code.rs:76:5
131 LL | unsafe fn provided_override(&self) {}
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134 error: implementation of an `unsafe` method
135 --> $DIR/lint-unsafe-code.rs:95:5
137 LL | unsafe fn provided_override(&self) {}
138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140 error: implementation of an `unsafe` method
141 --> $DIR/lint-unsafe-code.rs:106:5
143 LL | unsafe fn provided(&self) {}
144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146 error: implementation of an `unsafe` method
147 --> $DIR/lint-unsafe-code.rs:112:5
149 LL | unsafe fn provided(&self) {}
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152 error: implementation of an `unsafe` method
153 --> $DIR/lint-unsafe-code.rs:116:5
155 LL | unsafe fn baz(&self) {}
156 | ^^^^^^^^^^^^^^^^^^^^^^^
158 error: usage of an `unsafe` block
159 --> $DIR/lint-unsafe-code.rs:127:5
164 error: declaration of a `no_mangle` function
165 --> $DIR/lint-unsafe-code.rs:21:9
167 LL | #[no_mangle] fn foo() {}
170 LL | unsafe_in_macro!()
171 | ------------------ in this macro invocation
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)
176 error: declaration of a `no_mangle` static
177 --> $DIR/lint-unsafe-code.rs:22:9
179 LL | #[no_mangle] static FOO: u32 = 5;
182 LL | unsafe_in_macro!()
183 | ------------------ in this macro invocation
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)
188 error: declaration of a function with `export_name`
189 --> $DIR/lint-unsafe-code.rs:23:9
191 LL | #[export_name = "bar"] fn bar() {}
192 | ^^^^^^^^^^^^^^^^^^^^^^
194 LL | unsafe_in_macro!()
195 | ------------------ in this macro invocation
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)
200 error: declaration of a static with `export_name`
201 --> $DIR/lint-unsafe-code.rs:25:9
203 LL | #[export_name = "BAR"] static BAR: u32 = 5;
204 | ^^^^^^^^^^^^^^^^^^^^^^
206 LL | unsafe_in_macro!()
207 | ------------------ in this macro invocation
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)
212 error: usage of an `unsafe` block
213 --> $DIR/lint-unsafe-code.rs:27:9
218 LL | unsafe_in_macro!()
219 | ------------------ in this macro invocation
221 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
223 error: aborting due to 28 previous errors