1 #![allow(dead_code, unused_variables)]
3 // Check projection of an associated type out of a higher-ranked trait-bound
4 // in the context of a function signature.
9 fn get(&self, t: T) -> Self::A;
12 fn foo2<I : for<'x> Foo<&'x isize>>(
13 x: <I as Foo<&isize>>::A)
14 //~^ ERROR cannot use the associated type of a trait with uninferred generic parameters
16 // This case is illegal because we have to instantiate `'x`, and
17 // we don't know what region to instantiate it with.
19 // This could perhaps be made equivalent to the examples below,
20 // specifically for fn signatures.
23 fn foo3<I : for<'x> Foo<&'x isize>>(
24 x: <I as Foo<&isize>>::A)
26 // OK, in this case we spelled out the precise regions involved, though we left one of
30 fn foo4<'a, I : for<'x> Foo<&'x isize>>(
31 x: <I as Foo<&'a isize>>::A)
33 // OK, in this case we spelled out the precise regions involved.