]>
Commit | Line | Data |
---|---|---|
60c5eb7d XL |
1 | Cannot convert inline assembly operand to a single LLVM value. |
2 | ||
f9f354fc XL |
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 | ||
60c5eb7d XL |
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. |