]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-88595.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / issue-88595.rs
1 #![feature(type_alias_impl_trait)]
2
3 fn main() {}
4
5 trait A<'a> {
6     type B<'b>: Clone
7     // FIXME(generic_associated_types): Remove one of the below bounds
8     // https://github.com/rust-lang/rust/pull/90678#discussion_r744976085
9     where
10         Self: 'a, Self: 'b;
11
12     fn a(&'a self) -> Self::B<'a>;
13 }
14
15 struct C;
16
17 impl<'a> A<'a> for C {
18     type B<'b> = impl Clone;
19
20     fn a(&'a self) -> Self::B<'a> {} //~ ERROR: non-defining opaque type use in defining scope
21 }