rust/tests/ui/asm/const-error.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
261 B
Rust
Raw Normal View History

//@ only-x86_64
//@ needs-asm-support
2023-10-05 09:43:55 +00:00
#![feature(asm_const)]
// Test to make sure that we emit const errors eagerly for inline asm
use std::arch::asm;
fn test<T>() {
unsafe { asm!("/* {} */", const 1 / 0); }
//~^ ERROR evaluation of
}
fn main() {}