1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// check-pass #![feature(rustc_attrs)] trait Foo { type Bar; } impl Foo for () { type Bar = u32; } fn foo() -> <() as Foo>::Bar { 22 } fn main() { }