]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-88595.rs
New upstream version 1.58.1+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / issue-88595.rs
1 #![feature(generic_associated_types)]
2 #![feature(type_alias_impl_trait)]
3
4 fn main() {}
5
6 trait A<'a> {
7 type B<'b>: Clone
8 // FIXME(generic_associated_types): Remove one of the below bounds
9 // https://github.com/rust-lang/rust/pull/90678#discussion_r744976085
10 where
11 'a: 'b, Self: 'a, Self: 'b;
12
13 fn a(&'a self) -> Self::B<'a>;
14 }
15
16 struct C;
17
18 impl<'a> A<'a> for C {
19 type B<'b> = impl Clone;
20 //~^ ERROR: lifetime bound not satisfied
21 //~| ERROR: could not find defining uses
22
23 fn a(&'a self) -> Self::B<'a> {} //~ ERROR: non-defining opaque type use in defining scope
24 }