#![allow(dead_code)] // run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a method definition in a trait. pub trait Foo { type A; fn get(&self, t: T) -> Self::A; } trait SomeTrait Foo<&'x isize>> { fn some_method(&self, arg: >::A); //~^ ERROR cannot use the associated type of a trait with uninferred generic parameters } trait AnotherTrait Foo<&'x isize>> { fn some_method(&self, arg: >::A); } trait YetAnotherTrait Foo<&'x isize>> { fn some_method<'a>(&self, arg: >::A); } trait Banana<'a> { type Assoc: Default; } struct Peach(std::marker::PhantomData); impl Banana<'a>> Peach { fn mango(&self) -> >::Assoc { //~^ ERROR cannot use the associated type of a trait with uninferred generic parameters Default::default() } } pub fn main() {}