blob: 5b5b8b7c2d90b5928aafbb9417c5e1c3f9bbf898 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// check-pass
// edition:2021
#![allow(unreachable_code)]
async fn f(_: u8) {}
async fn g() {
// Todo returns `!`, so the await is never reached, and in particular the
// temporaries inside the formatting machinery are not still alive at the
// await point.
f(todo!("...")).await;
}
fn require_send(_: impl Send) {}
fn main() {
require_send(g());
}
|