]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-54895.rs
Rollup merge of #104946 - notriddle:notriddle/popover-menu-focus, r=GuillaumeGomez
[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 }