// ignore-pretty pretty-printing is unhygienic #![feature(decl_macro, associated_type_defaults)] // compile-pass // skip-codegen trait Base { type AssocTy; fn f(); } trait Derived: Base { fn g(); } macro mac() { type A = Base; type B = Derived; impl Base for u8 { type AssocTy = u8; fn f() { let _: Self::AssocTy; } } impl Derived for u8 { fn g() { let _: Self::AssocTy; } } fn h() { let _: T::AssocTy; let _: U::AssocTy; } } mac!(); fn main() {}