summary refs log tree commit diff
path: root/tests/ui/asm/const-error.rs
blob: 40d0590c33e9df0a6423a017537763901ecaec3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ only-x86_64
//@ needs-asm-support

// 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() {}