]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/feature-gate-asm_const.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / feature-gates / feature-gate-asm_const.rs
1 // only-x86_64
2
3 use std::arch::asm;
4
5 unsafe fn foo<const N: usize>() {
6     asm!("mov eax, {}", const N + 1);
7     //~^ ERROR const operands for inline assembly are unstable
8 }
9
10 fn main() {
11     unsafe {
12         foo::<0>();
13         asm!("mov eax, {}", const 123);
14         //~^ ERROR const operands for inline assembly are unstable
15     }
16 }