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