1 2 3 4 5 6 7 8 9 10 11 12
#![crate_name = "inner"] pub trait MyTrait { type Y; } impl MyTrait for u32 { type Y = i32; } pub fn foo() -> <u32 as MyTrait>::Y { 0 }