about summary refs log tree commit diff
path: root/tests/crashes/140303.rs
blob: 43a20b5e58ed49d95eb933849f7142ce4ec08865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ known-bug: #140303
//@compile-flags: -Zvalidate-mir
use std::future::Future;
async fn a() -> impl Sized {
    b(c)
}
async fn c(); // kaboom
fn b<d>(e: d) -> impl Sized
where
    d: f,
{
    || -> <d>::h { panic!() }
}
trait f {
    type h;
}
impl<d, g> f for d
where
    d: Fn() -> g,
    g: Future,
{
}