]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_error_codes/src/error_codes/E0668.md
New upstream version 1.60.0+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0668.md
CommitLineData
5099ac24
FG
1#### Note: this error code is no longer emitted by the compiler.
2
60c5eb7d
XL
3Malformed inline assembly rejected by LLVM.
4
f035d41b 5Erroneous code example:
60c5eb7d 6
5099ac24 7```ignore (no longer emitted)
ba9703b0 8#![feature(llvm_asm)]
60c5eb7d
XL
9
10fn main() {
11 let rax: u64;
12 unsafe {
ba9703b0 13 llvm_asm!("" :"={rax"(rax));
60c5eb7d
XL
14 println!("Accumulator is: {}", rax);
15 }
16}
17```
f035d41b
XL
18
19LLVM checks the validity of the constraints and the assembly string passed to
20it. This error implies that LLVM seems something wrong with the inline
21assembly call.
22
23In particular, it can happen if you forgot the closing bracket of a register
24constraint (see issue #51430), like in the previous code example.