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 function with `export_name`
23 --> $DIR/lint-unsafe-code.rs:34:1
25 LL | #[export_name = "bar"] fn bar() {}
26 | ^^^^^^^^^^^^^^^^^^^^^^
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 static with `export_name`
31 --> $DIR/lint-unsafe-code.rs:35:1
33 LL | #[export_name = "BAR"] static BAR: u32 = 5;
34 | ^^^^^^^^^^^^^^^^^^^^^^
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 an `unsafe` function
39 --> $DIR/lint-unsafe-code.rs:37:1
41 LL | unsafe fn baz() {}
44 error: declaration of an `unsafe` trait
45 --> $DIR/lint-unsafe-code.rs:38:1
47 LL | unsafe trait Foo {}
50 error: implementation of an `unsafe` trait
51 --> $DIR/lint-unsafe-code.rs:39:1
53 LL | unsafe impl Foo for Bar {}
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
56 error: declaration of an `unsafe` method
57 --> $DIR/lint-unsafe-code.rs:42:5
59 LL | unsafe fn baz(&self);
60 | ^^^^^^^^^^^^^^^^^^^^^
62 error: implementation of an `unsafe` method
63 --> $DIR/lint-unsafe-code.rs:43:5
65 LL | unsafe fn provided(&self) {}
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 error: implementation of an `unsafe` method
69 --> $DIR/lint-unsafe-code.rs:44:5
71 LL | unsafe fn provided_override(&self) {}
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 error: implementation of an `unsafe` method
75 --> $DIR/lint-unsafe-code.rs:48:5
77 LL | unsafe fn baz(&self) {}
78 | ^^^^^^^^^^^^^^^^^^^^^^^
80 error: implementation of an `unsafe` method
81 --> $DIR/lint-unsafe-code.rs:49:5
83 LL | unsafe fn provided_override(&self) {}
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 error: implementation of an `unsafe` method
87 --> $DIR/lint-unsafe-code.rs:68:5
89 LL | unsafe fn provided_override(&self) {}
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92 error: implementation of an `unsafe` method
93 --> $DIR/lint-unsafe-code.rs:79:5
95 LL | unsafe fn provided(&self) {}
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98 error: implementation of an `unsafe` method
99 --> $DIR/lint-unsafe-code.rs:85:5
101 LL | unsafe fn provided(&self) {}
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 error: implementation of an `unsafe` method
105 --> $DIR/lint-unsafe-code.rs:89:5
107 LL | unsafe fn baz(&self) {}
108 | ^^^^^^^^^^^^^^^^^^^^^^^
110 error: usage of an `unsafe` block
111 --> $DIR/lint-unsafe-code.rs:100:5
116 error: declaration of a `no_mangle` function
117 --> $DIR/lint-unsafe-code.rs:21:9
119 LL | #[no_mangle] fn foo() {}
122 LL | unsafe_in_macro!()
123 | ------------------ in this macro invocation
125 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
126 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
128 error: declaration of a `no_mangle` static
129 --> $DIR/lint-unsafe-code.rs:22:9
131 LL | #[no_mangle] static FOO: u32 = 5;
134 LL | unsafe_in_macro!()
135 | ------------------ in this macro invocation
137 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
138 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
140 error: declaration of a function with `export_name`
141 --> $DIR/lint-unsafe-code.rs:23:9
143 LL | #[export_name = "bar"] fn bar() {}
144 | ^^^^^^^^^^^^^^^^^^^^^^
146 LL | unsafe_in_macro!()
147 | ------------------ in this macro invocation
149 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
150 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
152 error: declaration of a static with `export_name`
153 --> $DIR/lint-unsafe-code.rs:25:9
155 LL | #[export_name = "BAR"] static BAR: u32 = 5;
156 | ^^^^^^^^^^^^^^^^^^^^^^
158 LL | unsafe_in_macro!()
159 | ------------------ in this macro invocation
161 = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
162 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
164 error: usage of an `unsafe` block
165 --> $DIR/lint-unsafe-code.rs:27:9
170 LL | unsafe_in_macro!()
171 | ------------------ in this macro invocation
173 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
175 error: aborting due to 22 previous errors