fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: asm with the `pure` option must have at least one output 2 --> $DIR/naked-functions.rs:111:14 3 | 4LL | asm!("", options(readonly, nostack), options(pure)); 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ 6 7error: this is a user specified error 8 --> $DIR/naked-functions.rs:203:5 9 | 10LL | compile_error!("this is a user specified error") 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 13error: this is a user specified error 14 --> $DIR/naked-functions.rs:209:5 15 | 16LL | compile_error!("this is a user specified error"); 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 18 19error: asm template must be a string literal 20 --> $DIR/naked-functions.rs:216:10 21 | 22LL | asm!(invalid_syntax) 23 | ^^^^^^^^^^^^^^ 24 25error: patterns not allowed in naked function parameters 26 --> $DIR/naked-functions.rs:20:5 27 | 28LL | mut a: u32, 29 | ^^^^^ 30 31error: patterns not allowed in naked function parameters 32 --> $DIR/naked-functions.rs:22:5 33 | 34LL | &b: &i32, 35 | ^^ 36 37error: patterns not allowed in naked function parameters 38 --> $DIR/naked-functions.rs:24:6 39 | 40LL | (None | Some(_)): Option<std::ptr::NonNull<u8>>, 41 | ^^^^^^^^^^^^^^ 42 43error: patterns not allowed in naked function parameters 44 --> $DIR/naked-functions.rs:26:5 45 | 46LL | P { x, y }: P, 47 | ^^^^^^^^^^ 48 49error: referencing function parameters is not allowed in naked functions 50 --> $DIR/naked-functions.rs:35:5 51 | 52LL | a + 1 53 | ^ 54 | 55 = help: follow the calling convention in asm block to use parameters 56 57error[E0787]: naked functions must contain a single asm block 58 --> $DIR/naked-functions.rs:33:1 59 | 60LL | pub unsafe extern "C" fn inc(a: u32) -> u32 { 61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 62LL | 63LL | a + 1 64 | ----- non-asm is unsupported in naked functions 65 66error: referencing function parameters is not allowed in naked functions 67 --> $DIR/naked-functions.rs:42:31 68 | 69LL | asm!("/* {0} */", in(reg) a, options(noreturn)); 70 | ^ 71 | 72 = help: follow the calling convention in asm block to use parameters 73 74error[E0787]: only `const` and `sym` operands are supported in naked functions 75 --> $DIR/naked-functions.rs:42:23 76 | 77LL | asm!("/* {0} */", in(reg) a, options(noreturn)); 78 | ^^^^^^^^^ 79 80error[E0787]: naked functions must contain a single asm block 81 --> $DIR/naked-functions.rs:48:1 82 | 83LL | pub unsafe extern "C" fn inc_closure(a: u32) -> u32 { 84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 85LL | 86LL | (|| a + 1)() 87 | ------------ non-asm is unsupported in naked functions 88 89error[E0787]: only `const` and `sym` operands are supported in naked functions 90 --> $DIR/naked-functions.rs:65:10 91 | 92LL | in(reg) a, 93 | ^^^^^^^^^ 94LL | 95LL | inlateout(reg) b, 96 | ^^^^^^^^^^^^^^^^ 97LL | inout(reg) c, 98 | ^^^^^^^^^^^^ 99LL | lateout(reg) d, 100 | ^^^^^^^^^^^^^^ 101LL | out(reg) e, 102 | ^^^^^^^^^^ 103 104error[E0787]: asm in naked functions must use `noreturn` option 105 --> $DIR/naked-functions.rs:63:5 106 | 107LL | / asm!("/* {0} {1} {2} {3} {4} {5} {6} */", 108LL | | 109LL | | in(reg) a, 110LL | | 111... | 112LL | | sym G, 113LL | | ); 114 | |_____^ 115 | 116help: consider specifying that the asm block is responsible for returning from the function 117 | 118LL | sym G, options(noreturn), 119 | +++++++++++++++++++ 120 121error[E0787]: naked functions must contain a single asm block 122 --> $DIR/naked-functions.rs:54:1 123 | 124LL | pub unsafe extern "C" fn unsupported_operands() { 125 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 126LL | 127LL | let mut a = 0usize; 128 | ------------------- non-asm is unsupported in naked functions 129LL | let mut b = 0usize; 130 | ------------------- non-asm is unsupported in naked functions 131LL | let mut c = 0usize; 132 | ------------------- non-asm is unsupported in naked functions 133LL | let mut d = 0usize; 134 | ------------------- non-asm is unsupported in naked functions 135LL | let mut e = 0usize; 136 | ------------------- non-asm is unsupported in naked functions 137 138error[E0787]: naked functions must contain a single asm block 139 --> $DIR/naked-functions.rs:77:1 140 | 141LL | pub extern "C" fn missing_assembly() { 142 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 143 144error[E0787]: asm in naked functions must use `noreturn` option 145 --> $DIR/naked-functions.rs:84:5 146 | 147LL | asm!(""); 148 | ^^^^^^^^ 149 | 150help: consider specifying that the asm block is responsible for returning from the function 151 | 152LL | asm!("", options(noreturn)); 153 | +++++++++++++++++++ 154 155error[E0787]: asm in naked functions must use `noreturn` option 156 --> $DIR/naked-functions.rs:86:5 157 | 158LL | asm!(""); 159 | ^^^^^^^^ 160 | 161help: consider specifying that the asm block is responsible for returning from the function 162 | 163LL | asm!("", options(noreturn)); 164 | +++++++++++++++++++ 165 166error[E0787]: asm in naked functions must use `noreturn` option 167 --> $DIR/naked-functions.rs:88:5 168 | 169LL | asm!(""); 170 | ^^^^^^^^ 171 | 172help: consider specifying that the asm block is responsible for returning from the function 173 | 174LL | asm!("", options(noreturn)); 175 | +++++++++++++++++++ 176 177error[E0787]: naked functions must contain a single asm block 178 --> $DIR/naked-functions.rs:82:1 179 | 180LL | pub extern "C" fn too_many_asm_blocks() { 181 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 182... 183LL | asm!(""); 184 | -------- multiple asm blocks are unsupported in naked functions 185LL | 186LL | asm!(""); 187 | -------- multiple asm blocks are unsupported in naked functions 188LL | 189LL | asm!("", options(noreturn)); 190 | --------------------------- multiple asm blocks are unsupported in naked functions 191 192error: referencing function parameters is not allowed in naked functions 193 --> $DIR/naked-functions.rs:97:11 194 | 195LL | *&y 196 | ^ 197 | 198 = help: follow the calling convention in asm block to use parameters 199 200error[E0787]: naked functions must contain a single asm block 201 --> $DIR/naked-functions.rs:95:5 202 | 203LL | pub extern "C" fn inner(y: usize) -> usize { 204 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 205LL | 206LL | *&y 207 | --- non-asm is unsupported in naked functions 208 209error[E0787]: asm options unsupported in naked functions: `nomem`, `preserves_flags` 210 --> $DIR/naked-functions.rs:105:5 211 | 212LL | asm!("", options(nomem, preserves_flags, noreturn)); 213 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 214 215error[E0787]: asm options unsupported in naked functions: `nostack`, `pure`, `readonly` 216 --> $DIR/naked-functions.rs:111:5 217 | 218LL | asm!("", options(readonly, nostack), options(pure)); 219 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 220 221error[E0787]: asm in naked functions must use `noreturn` option 222 --> $DIR/naked-functions.rs:111:5 223 | 224LL | asm!("", options(readonly, nostack), options(pure)); 225 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 226 | 227help: consider specifying that the asm block is responsible for returning from the function 228 | 229LL | asm!("", options(noreturn), options(readonly, nostack), options(pure)); 230 | +++++++++++++++++++ 231 232error[E0787]: asm options unsupported in naked functions: `may_unwind` 233 --> $DIR/naked-functions.rs:119:5 234 | 235LL | asm!("", options(noreturn, may_unwind)); 236 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 237 238warning: Rust ABI is unsupported in naked functions 239 --> $DIR/naked-functions.rs:124:1 240 | 241LL | pub unsafe fn default_abi() { 242 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 243 | 244 = note: `#[warn(undefined_naked_function_abi)]` on by default 245 246warning: Rust ABI is unsupported in naked functions 247 --> $DIR/naked-functions.rs:130:1 248 | 249LL | pub unsafe fn rust_abi() { 250 | ^^^^^^^^^^^^^^^^^^^^^^^^ 251 252error: naked functions cannot be inlined 253 --> $DIR/naked-functions.rs:170:1 254 | 255LL | #[inline] 256 | ^^^^^^^^^ 257 258error: naked functions cannot be inlined 259 --> $DIR/naked-functions.rs:177:1 260 | 261LL | #[inline(always)] 262 | ^^^^^^^^^^^^^^^^^ 263 264error: naked functions cannot be inlined 265 --> $DIR/naked-functions.rs:184:1 266 | 267LL | #[inline(never)] 268 | ^^^^^^^^^^^^^^^^ 269 270error: naked functions cannot be inlined 271 --> $DIR/naked-functions.rs:191:1 272 | 273LL | #[inline] 274 | ^^^^^^^^^ 275 276error: naked functions cannot be inlined 277 --> $DIR/naked-functions.rs:193:1 278 | 279LL | #[inline(always)] 280 | ^^^^^^^^^^^^^^^^^ 281 282error: naked functions cannot be inlined 283 --> $DIR/naked-functions.rs:195:1 284 | 285LL | #[inline(never)] 286 | ^^^^^^^^^^^^^^^^ 287 288error: aborting due to 33 previous errors; 2 warnings emitted 289 290For more information about this error, try `rustc --explain E0787`.