]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-54895.rs
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / src / test / ui / impl-trait / issues / issue-54895.rs
1 trait Trait<'a> {
2     type Out;
3     fn call(&'a self) -> Self::Out;
4 }
5
6 struct X(());
7
8 impl<'a> Trait<'a> for X {
9     type Out = ();
10     fn call(&'a self) -> Self::Out {
11         ()
12     }
13 }
14
15 fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
16     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
17     X(())
18 }
19
20 fn main() {
21     let _ = f();
22 }