mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
16 lines
261 B
Rust
16 lines
261 B
Rust
//@ only-x86_64
|
|
//@ needs-asm-support
|
|
|
|
#![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() {}
|