summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issues/issue-62517-1.rs
blob: 4689ce36a78c03721ad9cf34e1a6d1266a75df96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Regression test for #62517. We used to ICE when you had an `async
// fn` with an `impl Trait` return that mentioned a `dyn Bar` with no
// explicit lifetime bound.
//
// edition:2018
// check-pass

trait FirstTrait {}
trait SecondTrait {
    type Item: ?Sized;
}

async fn foo(x: &str) -> impl SecondTrait<Item = dyn FirstTrait> {
}


impl<T> SecondTrait for T {
    type Item = dyn FirstTrait;
}

fn main() { }