1 error: asm with the `pure` option must have at least one output
2 --> $DIR/naked-functions.rs:110:14
4 LL | asm!("", options(readonly, nostack), options(pure));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
7 error: patterns not allowed in naked function parameters
8 --> $DIR/naked-functions.rs:20:5
13 error: patterns not allowed in naked function parameters
14 --> $DIR/naked-functions.rs:22:5
19 error: patterns not allowed in naked function parameters
20 --> $DIR/naked-functions.rs:24:6
22 LL | (None | Some(_)): Option<std::ptr::NonNull<u8>>,
25 error: patterns not allowed in naked function parameters
26 --> $DIR/naked-functions.rs:26:5
31 error: referencing function parameters is not allowed in naked functions
32 --> $DIR/naked-functions.rs:35:5
37 = help: follow the calling convention in asm block to use parameters
39 error[E0787]: naked functions must contain a single asm block
40 --> $DIR/naked-functions.rs:33:1
42 LL | / pub unsafe extern "C" fn inc(a: u32) -> u32 {
45 | | ----- non-asm is unsupported in naked functions
50 error: referencing function parameters is not allowed in naked functions
51 --> $DIR/naked-functions.rs:41:31
53 LL | asm!("/* {0} */", in(reg) a, options(noreturn));
56 = help: follow the calling convention in asm block to use parameters
58 error[E0787]: only `const` and `sym` operands are supported in naked functions
59 --> $DIR/naked-functions.rs:41:23
61 LL | asm!("/* {0} */", in(reg) a, options(noreturn));
64 error[E0787]: naked functions must contain a single asm block
65 --> $DIR/naked-functions.rs:47:1
67 LL | / pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
70 | | ------------ non-asm is unsupported in naked functions
74 error[E0787]: only `const` and `sym` operands are supported in naked functions
75 --> $DIR/naked-functions.rs:64:10
80 LL | inlateout(reg) b,
89 error[E0787]: asm in naked functions must use `noreturn` option
90 --> $DIR/naked-functions.rs:62:5
92 LL | / asm!("/* {0} {1} {2} {3} {4} {5} {6} */",
101 error[E0787]: naked functions must contain a single asm block
102 --> $DIR/naked-functions.rs:53:1
104 LL | / pub unsafe extern "C" fn unsupported_operands() {
106 LL | | let mut a = 0usize;
107 | | ------------------- non-asm is unsupported in naked functions
108 LL | | let mut b = 0usize;
109 | | ------------------- non-asm is unsupported in naked functions
110 LL | | let mut c = 0usize;
111 | | ------------------- non-asm is unsupported in naked functions
112 LL | | let mut d = 0usize;
113 | | ------------------- non-asm is unsupported in naked functions
114 LL | | let mut e = 0usize;
115 | | ------------------- non-asm is unsupported in naked functions
121 error[E0787]: naked functions must contain a single asm block
122 --> $DIR/naked-functions.rs:76:1
124 LL | / pub extern "C" fn missing_assembly() {
129 error[E0787]: asm in naked functions must use `noreturn` option
130 --> $DIR/naked-functions.rs:83:5
135 error[E0787]: asm in naked functions must use `noreturn` option
136 --> $DIR/naked-functions.rs:85:5
141 error[E0787]: asm in naked functions must use `noreturn` option
142 --> $DIR/naked-functions.rs:87:5
147 error[E0787]: naked functions must contain a single asm block
148 --> $DIR/naked-functions.rs:81:1
150 LL | / pub extern "C" fn too_many_asm_blocks() {
155 | | -------- multiple asm blocks are unsupported in naked functions
158 | | -------- multiple asm blocks are unsupported in naked functions
160 LL | | asm!("", options(noreturn));
161 | | --------------------------- multiple asm blocks are unsupported in naked functions
165 error: referencing function parameters is not allowed in naked functions
166 --> $DIR/naked-functions.rs:96:11
171 = help: follow the calling convention in asm block to use parameters
173 error[E0787]: naked functions must contain a single asm block
174 --> $DIR/naked-functions.rs:94:5
176 LL | / pub extern "C" fn inner(y: usize) -> usize {
179 | | --- non-asm is unsupported in naked functions
184 error[E0787]: asm options unsupported in naked functions: `nomem`, `preserves_flags`
185 --> $DIR/naked-functions.rs:104:5
187 LL | asm!("", options(nomem, preserves_flags, noreturn));
188 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190 error[E0787]: asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
191 --> $DIR/naked-functions.rs:110:5
193 LL | asm!("", options(readonly, nostack), options(pure));
194 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196 error[E0787]: asm in naked functions must use `noreturn` option
197 --> $DIR/naked-functions.rs:110:5
199 LL | asm!("", options(readonly, nostack), options(pure));
200 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202 error[E0787]: asm options unsupported in naked functions: `may_unwind`
203 --> $DIR/naked-functions.rs:118:5
205 LL | asm!("", options(noreturn, may_unwind));
206 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
208 warning: Rust ABI is unsupported in naked functions
209 --> $DIR/naked-functions.rs:123:15
211 LL | pub unsafe fn default_abi() {
214 = note: `#[warn(undefined_naked_function_abi)]` on by default
216 warning: Rust ABI is unsupported in naked functions
217 --> $DIR/naked-functions.rs:129:15
219 LL | pub unsafe fn rust_abi() {
222 error: naked functions cannot be inlined
223 --> $DIR/naked-functions.rs:169:1
228 error: naked functions cannot be inlined
229 --> $DIR/naked-functions.rs:176:1
231 LL | #[inline(always)]
234 error: naked functions cannot be inlined
235 --> $DIR/naked-functions.rs:183:1
237 LL | #[inline(never)]
240 error: naked functions cannot be inlined
241 --> $DIR/naked-functions.rs:190:1
246 error: naked functions cannot be inlined
247 --> $DIR/naked-functions.rs:192:1
249 LL | #[inline(always)]
252 error: naked functions cannot be inlined
253 --> $DIR/naked-functions.rs:194:1
255 LL | #[inline(never)]
258 error: aborting due to 30 previous errors; 2 warnings emitted
260 For more information about this error, try `rustc --explain E0787`.