diff options
Diffstat (limited to 'tests/ui/rustc_public-ir-print/async-closure.rs')
| -rw-r--r-- | tests/ui/rustc_public-ir-print/async-closure.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/rustc_public-ir-print/async-closure.rs b/tests/ui/rustc_public-ir-print/async-closure.rs new file mode 100644 index 00000000000..80f96e09cfc --- /dev/null +++ b/tests/ui/rustc_public-ir-print/async-closure.rs @@ -0,0 +1,12 @@ +//@ compile-flags: -Z unpretty=stable-mir --crate-type lib -C panic=abort -Zmir-opt-level=0 +//@ check-pass +//@ only-x86_64 +//@ edition: 2024 +//@ needs-unwind unwind edges are different with panic=abort + +pub fn foo() { + let y = 0; + let x = async || { + let y = y; + }; +} |
