]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0668.md
Rollup merge of #67875 - dtolnay:hidden, r=GuillaumeGomez
[rust.git] / src / librustc_error_codes / error_codes / E0668.md
1 Malformed inline assembly rejected by LLVM.
2
3 LLVM checks the validity of the constraints and the assembly string passed to
4 it. This error implies that LLVM seems something wrong with the inline
5 assembly call.
6
7 In particular, it can happen if you forgot the closing bracket of a register
8 constraint (see issue #51430):
9 ```ignore (error-emitted-at-codegen-which-cannot-be-handled-by-compile_fail)
10 #![feature(asm)]
11
12 fn main() {
13     let rax: u64;
14     unsafe {
15         asm!("" :"={rax"(rax));
16         println!("Accumulator is: {}", rax);
17     }
18 }
19 ```