]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0669.md
Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0669.md
1 #### Note: this error code is no longer emitted by the compiler.
2
3 Cannot convert inline assembly operand to a single LLVM value.
4
5 Erroneous code example:
6
7 ```ignore (no longer emitted)
8 #![feature(llvm_asm)]
9
10 fn main() {
11     unsafe {
12         llvm_asm!("" :: "r"("")); // error!
13     }
14 }
15 ```
16
17 This error usually happens when trying to pass in a value to an input inline
18 assembly operand that is actually a pair of values. In particular, this can
19 happen when trying to pass in a slice, for instance a `&str`. In Rust, these
20 values are represented internally as a pair of values, the pointer and its
21 length. When passed as an input operand, this pair of values can not be
22 coerced into a register and thus we must fail with an error.