about summary refs log tree commit diff
path: root/tests/ui/asm/asm-with-nested-closure.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-17 16:09:46 +0000
committerMichael Goulet <michael@errs.io>2025-02-22 00:12:07 +0000
commit6ba39f7dc709a90bcb125974964a7e464ed86ff2 (patch)
tree68d6c9515988454516ca2373683f87d01b890c9f /tests/ui/asm/asm-with-nested-closure.rs
parent37060aae13d0fe771f9d3222f1c644820a9d2837 (diff)
downloadrust-6ba39f7dc709a90bcb125974964a7e464ed86ff2.tar.gz
rust-6ba39f7dc709a90bcb125974964a7e464ed86ff2.zip
Make a fake body to store typeck results for global_asm
Diffstat (limited to 'tests/ui/asm/asm-with-nested-closure.rs')
-rw-r--r--tests/ui/asm/asm-with-nested-closure.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/asm/asm-with-nested-closure.rs b/tests/ui/asm/asm-with-nested-closure.rs
new file mode 100644
index 00000000000..3a5cd48d5d4
--- /dev/null
+++ b/tests/ui/asm/asm-with-nested-closure.rs
@@ -0,0 +1,11 @@
+//@ build-pass
+//@ needs-asm-support
+
+fn foo<const N: usize>() {}
+
+core::arch::global_asm!("/* {} */", sym foo::<{
+    || {};
+    0
+}>);
+
+fn main() {}