blob: d9c482e23e47c24d16d07c1c801c79eed61ffafd [file] [log] [blame]
#![feature(generic_associated_types)]
//~^ WARNING the feature `generic_associated_types` is incomplete
use std::ops::Deref;
// FIXME(#44265): "lifetime arguments are not allowed on this entity" errors will be addressed in a
// follow-up PR.
trait Foo {
type Bar<'a, 'b>;
}
trait Baz {
type Quux<'a>: Foo;
// This weird type tests that we can use universal function call syntax to access the Item on
type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>;
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
//~| ERROR lifetime arguments are not allowed on this entity [E0110]
}
impl<T> Baz for T where T: Foo {
type Quux<'a> = T;
type Baa<'a> = &'a <T as Foo>::Bar<'a, 'static>;
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
}
fn main() {}