3 #![allow(unused_variables)]
4 #![allow(unused_imports)]
5 // Test paths to associated types using the type-parameter-only sugar.
11 fn boo(&self) -> Self::A;
16 fn boo(&self) -> usize {
21 // Using a type via a function.
22 pub fn bar<T: Foo>(a: T, x: T::A) -> T::A {
23 let _: T::A = a.boo();
27 // Using a type via an impl.
33 impl<T: Foo> C for B<T> {
35 let x: T::A = panic!();
40 let z: usize = bar(2, 4);