about summary refs log tree commit diff
path: root/tests/ui/parser/async-with-nonterminal-block.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-06-23 05:31:14 +0000
committerMichael Goulet <michael@errs.io>2023-07-22 15:22:12 +0000
commit7b962d754350dd7cc8d2729416cb36a7244b3dd0 (patch)
treea3f983a7096035f1930251a97dd41b5d92d3f3f7 /tests/ui/parser/async-with-nonterminal-block.rs
parent8164cdb9ee460eddcb8888b9b6f72836a956d110 (diff)
downloadrust-7b962d754350dd7cc8d2729416cb36a7244b3dd0.tar.gz
rust-7b962d754350dd7cc8d2729416cb36a7244b3dd0.zip
Support interpolated block for try and async
Diffstat (limited to 'tests/ui/parser/async-with-nonterminal-block.rs')
-rw-r--r--tests/ui/parser/async-with-nonterminal-block.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/parser/async-with-nonterminal-block.rs b/tests/ui/parser/async-with-nonterminal-block.rs
new file mode 100644
index 00000000000..96015fd5d82
--- /dev/null
+++ b/tests/ui/parser/async-with-nonterminal-block.rs
@@ -0,0 +1,16 @@
+// check-pass
+// edition:2021
+
+macro_rules! create_async {
+    ($body:block) => {
+        async $body
+    };
+}
+
+async fn other() {}
+
+fn main() {
+    let y = create_async! {{
+        other().await;
+    }};
+}