]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/naked-functions.stderr
Auto merge of #86155 - alexcrichton:abort-on-unwind, r=nikomatsakis
[rust.git] / src / test / ui / asm / naked-functions.stderr
1 error: asm with `pure` option must have at least one output
2   --> $DIR/naked-functions.rs:126:14
3    |
4 LL |     asm!("", options(readonly, nostack), options(pure));
5    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^
6
7 error: patterns not allowed in naked function parameters
8   --> $DIR/naked-functions.rs:13:5
9    |
10 LL |     mut a: u32,
11    |     ^^^^^
12
13 error: patterns not allowed in naked function parameters
14   --> $DIR/naked-functions.rs:15:5
15    |
16 LL |     &b: &i32,
17    |     ^^
18
19 error: patterns not allowed in naked function parameters
20   --> $DIR/naked-functions.rs:17:6
21    |
22 LL |     (None | Some(_)): Option<std::ptr::NonNull<u8>>,
23    |      ^^^^^^^^^^^^^^
24
25 error: patterns not allowed in naked function parameters
26   --> $DIR/naked-functions.rs:19:5
27    |
28 LL |     P { x, y }: P,
29    |     ^^^^^^^^^^
30
31 error: referencing function parameters is not allowed in naked functions
32   --> $DIR/naked-functions.rs:29:5
33    |
34 LL |     a + 1
35    |     ^
36    |
37    = help: follow the calling convention in asm block to use parameters
38
39 warning: naked functions must contain a single asm block
40   --> $DIR/naked-functions.rs:26:1
41    |
42 LL | / pub unsafe extern "C" fn inc(a: u32) -> u32 {
43 LL | |
44 LL | |
45 LL | |     a + 1
46    | |     ----- non-asm is unsupported in naked functions
47 LL | |
48 LL | | }
49    | |_^
50    |
51    = note: `#[warn(unsupported_naked_functions)]` on by default
52    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
53    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
54
55 error: referencing function parameters is not allowed in naked functions
56   --> $DIR/naked-functions.rs:35:31
57    |
58 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
59    |                               ^
60    |
61    = help: follow the calling convention in asm block to use parameters
62
63 warning: only `const` and `sym` operands are supported in naked functions
64   --> $DIR/naked-functions.rs:35:23
65    |
66 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
67    |                       ^^^^^^^^^
68    |
69    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
70    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
71
72 warning: naked functions must contain a single asm block
73   --> $DIR/naked-functions.rs:42:1
74    |
75 LL | / pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
76 LL | |
77 LL | |
78 LL | |     (|| a + 1)()
79    | |     ------------ non-asm is unsupported in naked functions
80 LL | | }
81    | |_^
82    |
83    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
84    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
85
86 warning: only `const` and `sym` operands are supported in naked functions
87   --> $DIR/naked-functions.rs:62:10
88    |
89 LL |          in(reg) a,
90    |          ^^^^^^^^^
91 ...
92 LL |          inlateout(reg) b,
93    |          ^^^^^^^^^^^^^^^^
94 LL |          inout(reg) c,
95    |          ^^^^^^^^^^^^
96 LL |          lateout(reg) d,
97    |          ^^^^^^^^^^^^^^
98 LL |          out(reg) e,
99    |          ^^^^^^^^^^
100    |
101    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
102    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
103
104 warning: asm in naked functions must use `noreturn` option
105   --> $DIR/naked-functions.rs:59:5
106    |
107 LL | /     asm!("/* {0} {1} {2} {3} {4} {5} {6} */",
108 LL | |
109 LL | |
110 LL | |          in(reg) a,
111 ...  |
112 LL | |          sym G,
113 LL | |     );
114    | |______^
115    |
116    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
117    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
118
119 warning: naked functions must contain a single asm block
120   --> $DIR/naked-functions.rs:49:1
121    |
122 LL | / pub unsafe extern "C" fn unsupported_operands() {
123 LL | |
124 LL | |
125 LL | |     let mut a = 0usize;
126    | |     ------------------- non-asm is unsupported in naked functions
127 LL | |     let mut b = 0usize;
128    | |     ------------------- non-asm is unsupported in naked functions
129 LL | |     let mut c = 0usize;
130    | |     ------------------- non-asm is unsupported in naked functions
131 LL | |     let mut d = 0usize;
132    | |     ------------------- non-asm is unsupported in naked functions
133 LL | |     let mut e = 0usize;
134    | |     ------------------- non-asm is unsupported in naked functions
135 ...  |
136 LL | |     );
137 LL | | }
138    | |_^
139    |
140    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
141    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
142
143 warning: naked functions must contain a single asm block
144   --> $DIR/naked-functions.rs:75:1
145    |
146 LL | / pub extern "C" fn missing_assembly() {
147 LL | |
148 LL | |
149 LL | | }
150    | |_^
151    |
152    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
153    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
154
155 warning: asm in naked functions must use `noreturn` option
156   --> $DIR/naked-functions.rs:84:5
157    |
158 LL |     asm!("");
159    |     ^^^^^^^^^
160    |
161    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
162    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
163
164 warning: asm in naked functions must use `noreturn` option
165   --> $DIR/naked-functions.rs:87:5
166    |
167 LL |     asm!("");
168    |     ^^^^^^^^^
169    |
170    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
171    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
172
173 warning: asm in naked functions must use `noreturn` option
174   --> $DIR/naked-functions.rs:90:5
175    |
176 LL |     asm!("");
177    |     ^^^^^^^^^
178    |
179    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
180    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
181
182 warning: naked functions must contain a single asm block
183   --> $DIR/naked-functions.rs:81:1
184    |
185 LL | / pub extern "C" fn too_many_asm_blocks() {
186 LL | |
187 LL | |
188 LL | |     asm!("");
189 ...  |
190 LL | |     asm!("");
191    | |     --------- multiple asm blocks are unsupported in naked functions
192 ...  |
193 LL | |     asm!("");
194    | |     --------- multiple asm blocks are unsupported in naked functions
195 ...  |
196 LL | |     asm!("", options(noreturn));
197    | |     ---------------------------- multiple asm blocks are unsupported in naked functions
198 LL | | }
199    | |_^
200    |
201    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
202    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
203
204 error: referencing function parameters is not allowed in naked functions
205   --> $DIR/naked-functions.rs:101:11
206    |
207 LL |         *&y
208    |           ^
209    |
210    = help: follow the calling convention in asm block to use parameters
211
212 warning: naked functions must contain a single asm block
213   --> $DIR/naked-functions.rs:98:5
214    |
215 LL | /     pub extern "C" fn inner(y: usize) -> usize {
216 LL | |
217 LL | |
218 LL | |         *&y
219    | |         --- non-asm is unsupported in naked functions
220 LL | |
221 LL | |     }
222    | |_____^
223    |
224    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
225    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
226
227 warning: the LLVM-style inline assembly is unsupported in naked functions
228   --> $DIR/naked-functions.rs:111:5
229    |
230 LL |     llvm_asm!("");
231    |     ^^^^^^^^^^^^^^
232    |
233    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
234    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
235    = help: use the new asm! syntax specified in RFC 2873
236    = note: this warning originates in the macro `llvm_asm` (in Nightly builds, run with -Z macro-backtrace for more info)
237
238 warning: naked functions must contain a single asm block
239   --> $DIR/naked-functions.rs:108:1
240    |
241 LL | / unsafe extern "C" fn llvm() -> ! {
242 LL | |
243 LL | |
244 LL | |     llvm_asm!("");
245 ...  |
246 LL | |     core::hint::unreachable_unchecked();
247    | |     ------------------------------------ non-asm is unsupported in naked functions
248 LL | | }
249    | |_^
250    |
251    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
252    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
253
254 warning: asm options unsupported in naked functions: `nomem`, `preserves_flags`
255   --> $DIR/naked-functions.rs:119:5
256    |
257 LL |     asm!("", options(nomem, preserves_flags, noreturn));
258    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
259    |
260    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
261    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
262
263 warning: asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
264   --> $DIR/naked-functions.rs:126:5
265    |
266 LL |     asm!("", options(readonly, nostack), options(pure));
267    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
268    |
269    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
270    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
271
272 warning: asm in naked functions must use `noreturn` option
273   --> $DIR/naked-functions.rs:126:5
274    |
275 LL |     asm!("", options(readonly, nostack), options(pure));
276    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
277    |
278    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
279    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
280
281 warning: Rust ABI is unsupported in naked functions
282   --> $DIR/naked-functions.rs:135:15
283    |
284 LL | pub unsafe fn default_abi() {
285    |               ^^^^^^^^^^^
286    |
287    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
288    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
289
290 warning: Rust ABI is unsupported in naked functions
291   --> $DIR/naked-functions.rs:142:29
292    |
293 LL | pub unsafe extern "Rust" fn rust_abi() {
294    |                             ^^^^^^^^
295    |
296    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
297    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
298
299 warning: naked functions cannot be inlined
300   --> $DIR/naked-functions.rs:177:1
301    |
302 LL | #[inline]
303    | ^^^^^^^^^
304    |
305    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
306    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
307
308 warning: naked functions cannot be inlined
309   --> $DIR/naked-functions.rs:185:1
310    |
311 LL | #[inline(always)]
312    | ^^^^^^^^^^^^^^^^^
313    |
314    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
315    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
316
317 warning: naked functions cannot be inlined
318   --> $DIR/naked-functions.rs:193:1
319    |
320 LL | #[inline(never)]
321    | ^^^^^^^^^^^^^^^^
322    |
323    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
324    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
325
326 warning: naked functions cannot be inlined
327   --> $DIR/naked-functions.rs:201:1
328    |
329 LL | #[inline]
330    | ^^^^^^^^^
331    |
332    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
333    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
334
335 warning: naked functions cannot be inlined
336   --> $DIR/naked-functions.rs:204:1
337    |
338 LL | #[inline(always)]
339    | ^^^^^^^^^^^^^^^^^
340    |
341    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
342    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
343
344 warning: naked functions cannot be inlined
345   --> $DIR/naked-functions.rs:207:1
346    |
347 LL | #[inline(never)]
348    | ^^^^^^^^^^^^^^^^
349    |
350    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
351    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
352
353 error: aborting due to 8 previous errors; 25 warnings emitted
354