We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b662cac commit 8a3bc3fCopy full SHA for 8a3bc3f
1 file changed
tests/ui/asm/asm-const-ptr-mir-inline.rs
@@ -0,0 +1,17 @@
1
+//@ build-pass
2
+//@ needs-asm-support
3
+
4
+#![feature(asm_const_ptr)]
5
6
+// Force inline to exercise the codegen when the same asm const ptr is code-generated multiple
7
+// times.
8
+#[inline(always)]
9
+fn foo<const N:usize>() {
10
+ unsafe{core::arch::asm!("/* {} */", const &N)};
11
+}
12
13
+fn main(){
14
+ foo::<0>();
15
16
+ foo::<1>();
17
0 commit comments