mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
18 lines
344 B
Rust
18 lines
344 B
Rust
//@ 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() {}
|