mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
17 lines
336 B
Rust
17 lines
336 B
Rust
//@ only-x86_64
|
|
|
|
use std::arch::asm;
|
|
|
|
unsafe fn foo<const N: usize>() {
|
|
asm!("mov eax, {}", const N + 1);
|
|
//~^ ERROR const operands for inline assembly are unstable
|
|
}
|
|
|
|
fn main() {
|
|
unsafe {
|
|
foo::<0>();
|
|
asm!("mov eax, {}", const 123);
|
|
//~^ ERROR const operands for inline assembly are unstable
|
|
}
|
|
}
|