summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-asm_sym.rs
blob: 0de6b3abb18bb093faca77161f60ff29edac66db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// only-x86_64

use std::arch::asm;

fn bar<const N: usize>() {}

fn foo<const N: usize>() {
    unsafe {
        asm!("mov eax, {}", sym bar::<N>);
        //~^ ERROR sym operands for inline assembly are unstable
    }
}

fn main() {
    unsafe {
        asm!("mov eax, {}", sym foo::<0>);
        //~^ ERROR sym operands for inline assembly are unstable
    }
}