diff options
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0669.md')
-rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0669.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0669.md b/compiler/rustc_error_codes/src/error_codes/E0669.md new file mode 100644 index 000000000..2be8f04ed --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0669.md @@ -0,0 +1,22 @@ +#### Note: this error code is no longer emitted by the compiler. + +Cannot convert inline assembly operand to a single LLVM value. + +Erroneous code example: + +```ignore (no longer emitted) +#![feature(llvm_asm)] + +fn main() { + unsafe { + llvm_asm!("" :: "r"("")); // error! + } +} +``` + +This error usually happens when trying to pass in a value to an input inline +assembly operand that is actually a pair of values. In particular, this can +happen when trying to pass in a slice, for instance a `&str`. In Rust, these +values are represented internally as a pair of values, the pointer and its +length. When passed as an input operand, this pair of values can not be +coerced into a register and thus we must fail with an error. |