1 #![feature(generic_associated_types)]
5 type Assoc<'a> where Self: 'a;
7 fn f(&self) -> Self::Assoc<'_>;
9 // Disallow elision in return position, for now
10 fn g(&self) -> Self::Assoc;
11 //~^ ERROR missing generics for associated type `Trait::Assoc`
18 pub struct GenericStruct<'a> {
22 impl Trait for Struct {
23 type Assoc<'a> = GenericStruct<'a>;
25 fn f(&self) -> Self::Assoc<'_> {
31 // Disallow elision in return position, for now
32 fn g(&self) -> Self::Assoc {
33 //~^ ERROR missing generics for associated type `Trait::Assoc`