]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/lint-unsafe-code.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / lint / lint-unsafe-code.stderr
1 error: declaration of a `no_mangle` function
2 --> $DIR/lint-unsafe-code.rs:31:1
3 |
4 LL | #[no_mangle] fn foo() {}
5 | ^^^^^^^^^^^^
6 |
7 note: the lint level is defined here
8 --> $DIR/lint-unsafe-code.rs:3:9
9 |
10 LL | #![deny(unsafe_code)]
11 | ^^^^^^^^^^^
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
13
14 error: declaration of a `no_mangle` static
15 --> $DIR/lint-unsafe-code.rs:32:1
16 |
17 LL | #[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
22 error: declaration of a `no_mangle` method
23 --> $DIR/lint-unsafe-code.rs:41:5
24 |
25 LL | #[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
30 error: declaration of a `no_mangle` method
31 --> $DIR/lint-unsafe-code.rs:45:5
32 |
33 LL | #[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
38 error: declaration of a function with `export_name`
39 --> $DIR/lint-unsafe-code.rs:48:1
40 |
41 LL | #[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
46 error: declaration of a static with `export_name`
47 --> $DIR/lint-unsafe-code.rs:49:1
48 |
49 LL | #[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
54 error: declaration of a function with `link_section`
55 --> $DIR/lint-unsafe-code.rs:51:1
56 |
57 LL | #[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
62 error: declaration of a static with `link_section`
63 --> $DIR/lint-unsafe-code.rs:52:1
64 |
65 LL | #[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
70 error: declaration of a method with `export_name`
71 --> $DIR/lint-unsafe-code.rs:57:5
72 |
73 LL | #[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
78 error: declaration of a method with `export_name`
79 --> $DIR/lint-unsafe-code.rs:61:5
80 |
81 LL | #[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
86 error: declaration of an `unsafe` function
87 --> $DIR/lint-unsafe-code.rs:64:1
88 |
89 LL | unsafe fn baz() {}
90 | ^^^^^^^^^^^^^^^^^^
91
92 error: declaration of an `unsafe` trait
93 --> $DIR/lint-unsafe-code.rs:65:1
94 |
95 LL | unsafe trait Foo {}
96 | ^^^^^^^^^^^^^^^^^^^
97
98 error: implementation of an `unsafe` trait
99 --> $DIR/lint-unsafe-code.rs:66:1
100 |
101 LL | unsafe impl Foo for Bar {}
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
103
104 error: declaration of an `unsafe` method
105 --> $DIR/lint-unsafe-code.rs:69:5
106 |
107 LL | unsafe fn baz(&self);
108 | ^^^^^^^^^^^^^^^^^^^^^
109
110 error: implementation of an `unsafe` method
111 --> $DIR/lint-unsafe-code.rs:70:5
112 |
113 LL | unsafe fn provided(&self) {}
114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115
116 error: implementation of an `unsafe` method
117 --> $DIR/lint-unsafe-code.rs:71:5
118 |
119 LL | unsafe fn provided_override(&self) {}
120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121
122 error: implementation of an `unsafe` method
123 --> $DIR/lint-unsafe-code.rs:75:5
124 |
125 LL | unsafe fn baz(&self) {}
126 | ^^^^^^^^^^^^^^^^^^^^^^^
127
128 error: implementation of an `unsafe` method
129 --> $DIR/lint-unsafe-code.rs:76:5
130 |
131 LL | unsafe fn provided_override(&self) {}
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
134 error: implementation of an `unsafe` method
135 --> $DIR/lint-unsafe-code.rs:95:5
136 |
137 LL | unsafe fn provided_override(&self) {}
138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
139
140 error: implementation of an `unsafe` method
141 --> $DIR/lint-unsafe-code.rs:106:5
142 |
143 LL | unsafe fn provided(&self) {}
144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145
146 error: implementation of an `unsafe` method
147 --> $DIR/lint-unsafe-code.rs:112:5
148 |
149 LL | unsafe fn provided(&self) {}
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151
152 error: implementation of an `unsafe` method
153 --> $DIR/lint-unsafe-code.rs:116:5
154 |
155 LL | unsafe fn baz(&self) {}
156 | ^^^^^^^^^^^^^^^^^^^^^^^
157
158 error: usage of an `unsafe` block
159 --> $DIR/lint-unsafe-code.rs:127:5
160 |
161 LL | unsafe {}
162 | ^^^^^^^^^
163
164 error: declaration of a `no_mangle` function
165 --> $DIR/lint-unsafe-code.rs:21:9
166 |
167 LL | #[no_mangle] fn foo() {}
168 | ^^^^^^^^^^^^
169 ...
170 LL | 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
176 error: declaration of a `no_mangle` static
177 --> $DIR/lint-unsafe-code.rs:22:9
178 |
179 LL | #[no_mangle] static FOO: u32 = 5;
180 | ^^^^^^^^^^^^
181 ...
182 LL | 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
188 error: declaration of a function with `export_name`
189 --> $DIR/lint-unsafe-code.rs:23:9
190 |
191 LL | #[export_name = "bar"] fn bar() {}
192 | ^^^^^^^^^^^^^^^^^^^^^^
193 ...
194 LL | 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
200 error: declaration of a static with `export_name`
201 --> $DIR/lint-unsafe-code.rs:25:9
202 |
203 LL | #[export_name = "BAR"] static BAR: u32 = 5;
204 | ^^^^^^^^^^^^^^^^^^^^^^
205 ...
206 LL | 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
212 error: usage of an `unsafe` block
213 --> $DIR/lint-unsafe-code.rs:27:9
214 |
215 LL | unsafe {}
216 | ^^^^^^^^^
217 ...
218 LL | 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
223 error: aborting due to 28 previous errors
224