blob: 8c722906284ffd1ac174ea8bcf78de62ba2beaba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//@ only-x86_64
//@ needs-asm-support
//@ check-pass
// Test to make sure that we emit const errors late for inline asm,
// which is consistent with inline const blocks.
use std::arch::asm;
fn test<T>() {
unsafe {
// No error here, as this does not get monomorphized.
asm!("/* {} */", const 1 / 0);
}
}
fn main() {}
|