]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/issues/issue-54895.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / issues / issue-54895.rs
CommitLineData
5e7ed085
FG
1trait Trait<'a> {
2 type Out;
3 fn call(&'a self) -> Self::Out;
4}
5
6struct X(());
7
8impl<'a> Trait<'a> for X {
9 type Out = ();
10 fn call(&'a self) -> Self::Out {
11 ()
12 }
13}
14
15fn 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
20fn main() {
21 let _ = f();
22}