]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0668.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0668.md
1 #### Note: this error code is no longer emitted by the compiler.
2
3 Malformed inline assembly rejected by LLVM.
4
5 Erroneous code example:
6
7 ```ignore (no longer emitted)
8 #![feature(llvm_asm)]
9
10 fn main() {
11     let rax: u64;
12     unsafe {
13         llvm_asm!("" :"={rax"(rax));
14         println!("Accumulator is: {}", rax);
15     }
16 }
17 ```
18
19 LLVM checks the validity of the constraints and the assembly string passed to
20 it. This error implies that LLVM seems something wrong with the inline
21 assembly call.
22
23 In particular, it can happen if you forgot the closing bracket of a register
24 constraint (see issue #51430), like in the previous code example.