]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-62517-2.rs
Rollup merge of #103766 - lukas-code:error-in-core, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / issues / issue-62517-2.rs
1 // Regression test for #62517. We used to ICE when you had an `async
2 // fn` with an `impl Trait` return that mentioned a `dyn Bar` with no
3 // explicit lifetime bound.
4 //
5 // edition:2018
6 // check-pass
7
8 trait Object {}
9
10 trait Alpha<Param: ?Sized> {}
11
12 async fn foo<'a>(_: &'a ()) -> impl Alpha<dyn Object> {}
13
14 impl<T> Alpha<dyn Object> for T { }
15
16 fn main() { }