Closed
Description
When an error within the assembly body of an inline asm happens (such as an invalid opcode), rust reports the error without pointing which inline asm instance (e.g. which file/line) caused it to happen. For instance:
#![feature(asm)]
fn main() {
unsafe {asm!("out al, dx");}
}
The above "wrong" inline asm (on x86 32-bit) will report the following:
Compiling playground v0.0.1 (/playground)
error: <inline asm>:2:2: error: invalid operand for instruction
out al, dx
^
This makes it hard to track down where the error is caused.
Meta
rustc version: 1.45.0-nightly(2020-05-26 5239f5c)
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Inline assembly (`asm!(…)`)Category: This is a bug.Diagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.`#![feature(asm)]` (not `llvm_asm`)Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.