#[lang = "sized"] pub trait Sized {} trait Foo { type A; fn test(a: T, b: Self::A) -> (T, Self::A) { (a, b) } } struct Bar(T); impl Foo for Bar { type A = T; } pub fn main() { let a; a = Bar(123); let b: as Foo>::A; b = 456; let c; c = as Foo>::test(a.0, 123); }