rust/src/test/ui/issues/issue-23458.rs
Andy Russell 4728433c9e
make asm diagnostic instruction optional
`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so
the instruction shouldn't be blindly unwrapped.
2019-03-24 12:21:03 -04:00

11 lines
199 B
Rust

#![feature(asm)]
// only-x86_64
fn main() {
unsafe {
asm!("int $3"); //~ ERROR too few operands for instruction
//~| ERROR invalid operand in inline asm
}
}