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 method with `export_name`
55 --> $DIR/lint-unsafe-code.rs:54:5
57 LL | #[export_name = "bar"] fn bar() {}
58 | ^^^^^^^^^^^^^^^^^^^^^^
60 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
62 error: declaration of a method with `export_name`
63 --> $DIR/lint-unsafe-code.rs:58:5
65 LL | #[export_name = "bar"] fn foo() {}
66 | ^^^^^^^^^^^^^^^^^^^^^^
68 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
70 error: declaration of an `unsafe` function
71 --> $DIR/lint-unsafe-code.rs:61:1
73 LL | unsafe fn baz() {}
76 error: declaration of an `unsafe` trait
77 --> $DIR/lint-unsafe-code.rs:62:1
79 LL | unsafe trait Foo {}
82 error: implementation of an `unsafe` trait
83 --> $DIR/lint-unsafe-code.rs:63:1
85 LL | unsafe impl Foo for Bar {}
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
88 error: declaration of an `unsafe` method
89 --> $DIR/lint-unsafe-code.rs:66:5
91 LL | unsafe fn baz(&self);
92 | ^^^^^^^^^^^^^^^^^^^^^
94 error: implementation of an `unsafe` method
95 --> $DIR/lint-unsafe-code.rs:67:5
97 LL | unsafe fn provided(&self) {}
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100 error: implementation of an `unsafe` method
101 --> $DIR/lint-unsafe-code.rs:68:5
103 LL | unsafe fn provided_override(&self) {}
104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106 error: implementation of an `unsafe` method
107 --> $DIR/lint-unsafe-code.rs:72:5
109 LL | unsafe fn baz(&self) {}
110 | ^^^^^^^^^^^^^^^^^^^^^^^
112 error: implementation of an `unsafe` method
113 --> $DIR/lint-unsafe-code.rs:73:5
115 LL | unsafe fn provided_override(&self) {}
116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118 error: implementation of an `unsafe` method
119 --> $DIR/lint-unsafe-code.rs:92:5
121 LL | unsafe fn provided_override(&self) {}
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124 error: implementation of an `unsafe` method
125 --> $DIR/lint-unsafe-code.rs:103:5
127 LL | unsafe fn provided(&self) {}
128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130 error: implementation of an `unsafe` method
131 --> $DIR/lint-unsafe-code.rs:109:5
133 LL | unsafe fn provided(&self) {}
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 error: implementation of an `unsafe` method
137 --> $DIR/lint-unsafe-code.rs:113:5
139 LL | unsafe fn baz(&self) {}
140 | ^^^^^^^^^^^^^^^^^^^^^^^
142 error: usage of an `unsafe` block
143 --> $DIR/lint-unsafe-code.rs:124:5
148 error: declaration of a `no_mangle` function
149 --> $DIR/lint-unsafe-code.rs:21:9
151 LL | #[no_mangle] fn foo() {}
154 LL | unsafe_in_macro!()
155 | ------------------ in this macro invocation
157 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
158 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
160 error: declaration of a `no_mangle` static
161 --> $DIR/lint-unsafe-code.rs:22:9
163 LL | #[no_mangle] static FOO: u32 = 5;
166 LL | unsafe_in_macro!()
167 | ------------------ in this macro invocation
169 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
170 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
172 error: declaration of a function with `export_name`
173 --> $DIR/lint-unsafe-code.rs:23:9
175 LL | #[export_name = "bar"] fn bar() {}
176 | ^^^^^^^^^^^^^^^^^^^^^^
178 LL | unsafe_in_macro!()
179 | ------------------ in this macro invocation
181 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
182 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
184 error: declaration of a static with `export_name`
185 --> $DIR/lint-unsafe-code.rs:25:9
187 LL | #[export_name = "BAR"] static BAR: u32 = 5;
188 | ^^^^^^^^^^^^^^^^^^^^^^
190 LL | unsafe_in_macro!()
191 | ------------------ in this macro invocation
193 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
194 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
196 error: usage of an `unsafe` block
197 --> $DIR/lint-unsafe-code.rs:27:9
202 LL | unsafe_in_macro!()
203 | ------------------ in this macro invocation
205 = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
207 error: aborting due to 26 previous errors