]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0669.md
New upstream version 1.45.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0669.md
1 Cannot convert inline assembly operand to a single LLVM value.
2
3 Erroneous code example:
4
5 ```compile_fail,E0669
6 #![feature(llvm_asm)]
7
8 fn main() {
9 unsafe {
10 llvm_asm!("" :: "r"("")); // error!
11 }
12 }
13 ```
14
15 This error usually happens when trying to pass in a value to an input inline
16 assembly operand that is actually a pair of values. In particular, this can
17 happen when trying to pass in a slice, for instance a `&str`. In Rust, these
18 values are represented internally as a pair of values, the pointer and its
19 length. When passed as an input operand, this pair of values can not be
20 coerced into a register and thus we must fail with an error.