//@ needs-asm-support //@ build-pass #![feature(asm_const)] use std::arch::asm; fn foofoo() {} unsafe fn foo() { asm!("/* {0} */", const N); asm!("/* {0} */", const N + 1); asm!("/* {0} */", sym foofoo::); } fn barbar() {} unsafe fn bar() { asm!("/* {0} */", const std::mem::size_of::()); asm!("/* {0} */", const std::mem::size_of::<(T, T)>()); asm!("/* {0} */", sym barbar::); asm!("/* {0} */", sym barbar::<(T, T)>); } fn main() { unsafe { foo::<0>(); bar::(); } }