]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/naked-functions.stderr
more clippy fixes
[rust.git] / src / test / ui / asm / naked-functions.stderr
1 error: asm with the `pure` option must have at least one output
2   --> $DIR/naked-functions.rs:131: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:18:5
9    |
10 LL |     mut a: u32,
11    |     ^^^^^
12
13 error: patterns not allowed in naked function parameters
14   --> $DIR/naked-functions.rs:20:5
15    |
16 LL |     &b: &i32,
17    |     ^^
18
19 error: patterns not allowed in naked function parameters
20   --> $DIR/naked-functions.rs:22: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:24: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:34: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:31: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:40: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:40: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:47: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:67: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:64: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:54: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:80: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:89: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:92: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:95: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:86: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:106: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:103: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:116: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:113: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:124: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:131: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:131: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:140:15
283    |
284 LL | pub unsafe fn default_abi() {
285    |               ^^^^^^^^^^^
286    |
287    = note: `#[warn(undefined_naked_function_abi)]` on by default
288
289 warning: Rust ABI is unsupported in naked functions
290   --> $DIR/naked-functions.rs:146:29
291    |
292 LL | pub unsafe extern "Rust" fn rust_abi() {
293    |                             ^^^^^^^^
294
295 warning: naked functions cannot be inlined
296   --> $DIR/naked-functions.rs:180:1
297    |
298 LL | #[inline]
299    | ^^^^^^^^^
300    |
301    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
302    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
303
304 warning: naked functions cannot be inlined
305   --> $DIR/naked-functions.rs:188:1
306    |
307 LL | #[inline(always)]
308    | ^^^^^^^^^^^^^^^^^
309    |
310    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
311    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
312
313 warning: naked functions cannot be inlined
314   --> $DIR/naked-functions.rs:196:1
315    |
316 LL | #[inline(never)]
317    | ^^^^^^^^^^^^^^^^
318    |
319    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
320    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
321
322 warning: naked functions cannot be inlined
323   --> $DIR/naked-functions.rs:204:1
324    |
325 LL | #[inline]
326    | ^^^^^^^^^
327    |
328    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
329    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
330
331 warning: naked functions cannot be inlined
332   --> $DIR/naked-functions.rs:207:1
333    |
334 LL | #[inline(always)]
335    | ^^^^^^^^^^^^^^^^^
336    |
337    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
338    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
339
340 warning: naked functions cannot be inlined
341   --> $DIR/naked-functions.rs:210:1
342    |
343 LL | #[inline(never)]
344    | ^^^^^^^^^^^^^^^^
345    |
346    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
347    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
348
349 error: aborting due to 8 previous errors; 25 warnings emitted
350