2019-08-08 02:36:24 -05:00
|
|
|
// 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
|
2019-08-19 12:53:06 -05:00
|
|
|
// check-pass
|
2019-08-08 02:36:24 -05:00
|
|
|
|
|
|
|
trait Object {}
|
|
|
|
|
2019-08-19 12:53:06 -05:00
|
|
|
trait Alpha<Param: ?Sized> {}
|
2019-08-08 02:36:24 -05:00
|
|
|
|
|
|
|
async fn foo<'a>(_: &'a ()) -> impl Alpha<dyn Object> {}
|
2019-08-19 12:53:06 -05:00
|
|
|
|
|
|
|
impl<T> Alpha<dyn Object> for T { }
|
2019-08-08 02:36:24 -05:00
|
|
|
|
|
|
|
fn main() { }
|