]> git.lizzy.rs Git - rust.git/blob - src/test/ui/fmt/format-with-yield-point.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / fmt / format-with-yield-point.rs
1 // check-pass
2 // edition:2021
3
4 macro_rules! m {
5     () => {
6         async {}.await
7     };
8 }
9
10 async fn with_await() {
11     println!("{} {:?}", "", async {}.await);
12 }
13
14 async fn with_macro_call_expr() {
15     println!("{} {:?}", "", m!());
16 }
17
18 async fn with_macro_call_stmt_semi() {
19     println!("{} {:?}", "", { m!(); });
20 }
21
22 async fn with_macro_call_stmt_braced() {
23     println!("{} {:?}", "", { m!{} });
24 }
25
26 fn assert_send(_: impl Send) {}
27
28 fn main() {
29     assert_send(with_await());
30     assert_send(with_macro_call_expr());
31     assert_send(with_macro_call_stmt_semi());
32     assert_send(with_macro_call_stmt_braced());
33 }