1 error: asm with the `pure` option must have at least one output
2 --> $DIR/naked-functions.rs:111:14
4 LL | asm!("", options(readonly, nostack), options(pure));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
7 error: this is a user specified error
8 --> $DIR/naked-functions.rs:203:5
10 LL | compile_error!("this is a user specified error")
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 error: this is a user specified error
14 --> $DIR/naked-functions.rs:209:5
16 LL | compile_error!("this is a user specified error");
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 error: asm template must be a string literal
20 --> $DIR/naked-functions.rs:216:10
22 LL | asm!(invalid_syntax)
25 error: patterns not allowed in naked function parameters
26 --> $DIR/naked-functions.rs:20:5
31 error: patterns not allowed in naked function parameters
32 --> $DIR/naked-functions.rs:22:5
37 error: patterns not allowed in naked function parameters
38 --> $DIR/naked-functions.rs:24:6
40 LL | (None | Some(_)): Option<std::ptr::NonNull<u8>>,
43 error: patterns not allowed in naked function parameters
44 --> $DIR/naked-functions.rs:26:5
49 error: referencing function parameters is not allowed in naked functions
50 --> $DIR/naked-functions.rs:35:5
55 = help: follow the calling convention in asm block to use parameters
57 error[E0787]: naked functions must contain a single asm block
58 --> $DIR/naked-functions.rs:33:1
60 LL | / pub unsafe extern "C" fn inc(a: u32) -> u32 {
63 | | ----- non-asm is unsupported in naked functions
68 error: referencing function parameters is not allowed in naked functions
69 --> $DIR/naked-functions.rs:42:31
71 LL | asm!("/* {0} */", in(reg) a, options(noreturn));
74 = help: follow the calling convention in asm block to use parameters
76 error[E0787]: only `const` and `sym` operands are supported in naked functions
77 --> $DIR/naked-functions.rs:42:23
79 LL | asm!("/* {0} */", in(reg) a, options(noreturn));
82 error[E0787]: naked functions must contain a single asm block
83 --> $DIR/naked-functions.rs:48:1
85 LL | / pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
88 | | ------------ non-asm is unsupported in naked functions
92 error[E0787]: only `const` and `sym` operands are supported in naked functions
93 --> $DIR/naked-functions.rs:65:10
98 LL | inlateout(reg) b,
107 error[E0787]: asm in naked functions must use `noreturn` option
108 --> $DIR/naked-functions.rs:63:5
110 LL | / asm!("/* {0} {1} {2} {3} {4} {5} {6} */",
119 help: consider specifying that the asm block is responsible for returning from the function
121 LL | sym G, options(noreturn),
122 | +++++++++++++++++++
124 error[E0787]: naked functions must contain a single asm block
125 --> $DIR/naked-functions.rs:54:1
127 LL | / pub unsafe extern "C" fn unsupported_operands() {
129 LL | | let mut a = 0usize;
130 | | ------------------- non-asm is unsupported in naked functions
131 LL | | let mut b = 0usize;
132 | | ------------------- non-asm is unsupported in naked functions
133 LL | | let mut c = 0usize;
134 | | ------------------- non-asm is unsupported in naked functions
135 LL | | let mut d = 0usize;
136 | | ------------------- non-asm is unsupported in naked functions
137 LL | | let mut e = 0usize;
138 | | ------------------- non-asm is unsupported in naked functions
144 error[E0787]: naked functions must contain a single asm block
145 --> $DIR/naked-functions.rs:77:1
147 LL | / pub extern "C" fn missing_assembly() {
152 error[E0787]: asm in naked functions must use `noreturn` option
153 --> $DIR/naked-functions.rs:84:5
158 help: consider specifying that the asm block is responsible for returning from the function
160 LL | asm!("", options(noreturn));
161 | +++++++++++++++++++
163 error[E0787]: asm in naked functions must use `noreturn` option
164 --> $DIR/naked-functions.rs:86:5
169 help: consider specifying that the asm block is responsible for returning from the function
171 LL | asm!("", options(noreturn));
172 | +++++++++++++++++++
174 error[E0787]: asm in naked functions must use `noreturn` option
175 --> $DIR/naked-functions.rs:88:5
180 help: consider specifying that the asm block is responsible for returning from the function
182 LL | asm!("", options(noreturn));
183 | +++++++++++++++++++
185 error[E0787]: naked functions must contain a single asm block
186 --> $DIR/naked-functions.rs:82:1
188 LL | / pub extern "C" fn too_many_asm_blocks() {
193 | | -------- multiple asm blocks are unsupported in naked functions
196 | | -------- multiple asm blocks are unsupported in naked functions
198 LL | | asm!("", options(noreturn));
199 | | --------------------------- multiple asm blocks are unsupported in naked functions
203 error: referencing function parameters is not allowed in naked functions
204 --> $DIR/naked-functions.rs:97:11
209 = help: follow the calling convention in asm block to use parameters
211 error[E0787]: naked functions must contain a single asm block
212 --> $DIR/naked-functions.rs:95:5
214 LL | / pub extern "C" fn inner(y: usize) -> usize {
217 | | --- non-asm is unsupported in naked functions
222 error[E0787]: asm options unsupported in naked functions: `nomem`, `preserves_flags`
223 --> $DIR/naked-functions.rs:105:5
225 LL | asm!("", options(nomem, preserves_flags, noreturn));
226 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228 error[E0787]: asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
229 --> $DIR/naked-functions.rs:111:5
231 LL | asm!("", options(readonly, nostack), options(pure));
232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
234 error[E0787]: asm in naked functions must use `noreturn` option
235 --> $DIR/naked-functions.rs:111:5
237 LL | asm!("", options(readonly, nostack), options(pure));
238 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 help: consider specifying that the asm block is responsible for returning from the function
242 LL | asm!("", options(noreturn), options(readonly, nostack), options(pure));
243 | +++++++++++++++++++
245 error[E0787]: asm options unsupported in naked functions: `may_unwind`
246 --> $DIR/naked-functions.rs:119:5
248 LL | asm!("", options(noreturn, may_unwind));
249 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
251 warning: Rust ABI is unsupported in naked functions
252 --> $DIR/naked-functions.rs:124:15
254 LL | pub unsafe fn default_abi() {
257 = note: `#[warn(undefined_naked_function_abi)]` on by default
259 warning: Rust ABI is unsupported in naked functions
260 --> $DIR/naked-functions.rs:130:15
262 LL | pub unsafe fn rust_abi() {
265 error: naked functions cannot be inlined
266 --> $DIR/naked-functions.rs:170:1
271 error: naked functions cannot be inlined
272 --> $DIR/naked-functions.rs:177:1
274 LL | #[inline(always)]
277 error: naked functions cannot be inlined
278 --> $DIR/naked-functions.rs:184:1
280 LL | #[inline(never)]
283 error: naked functions cannot be inlined
284 --> $DIR/naked-functions.rs:191:1
289 error: naked functions cannot be inlined
290 --> $DIR/naked-functions.rs:193:1
292 LL | #[inline(always)]
295 error: naked functions cannot be inlined
296 --> $DIR/naked-functions.rs:195:1
298 LL | #[inline(never)]
301 error: aborting due to 33 previous errors; 2 warnings emitted
303 For more information about this error, try `rustc --explain E0787`.