1 // edition:2021
2
3 trait SendFuture: Send {
4 type Output;
5 }
6
7 impl<Fut: Send> SendFuture for Fut {
8 type Output = ();
9 }
10
broken_fut()11 async fn broken_fut() {
12 ident_error;
13 //~^ ERROR cannot find value `ident_error` in this scope
14 }
15
16 // triggers normalization of `<Fut as SendFuture>::Output`,
17 // which requires `Fut: Send`.
normalize<Fut: SendFuture>(_: Fut, _: Fut::Output)18 fn normalize<Fut: SendFuture>(_: Fut, _: Fut::Output) {}
19
iceice<A, B>() where A: Send, B: Send,20 async fn iceice<A, B>()
21 // <- async fn is necessary
22 where
23 A: Send,
24 B: Send, // <- a second bound
25 {
26 normalize(broken_fut(), ());
27 //~^ ERROR: cannot check whether the hidden type of opaque type satisfies auto traits
28 //~| ERROR: cannot check whether the hidden type of opaque type satisfies auto traits
29 }
30
main()31 fn main() {}
32