fn main() {} struct S0(T); impl S0 { const C: S0 = Self(0); //~^ ERROR mismatched types //~| ERROR mismatched types fn foo() { Self(0); //~^ ERROR mismatched types } } // Testing normalization. trait Fun { type Out; } impl Fun for S0 { type Out = Self; } trait Foo { fn foo(); } impl Foo for as Fun>::Out { fn foo() { Self(0); //~ ERROR mismatched types } } struct S1(T, U); impl S1 { const C: S1 = Self(0, 1); //~^ ERROR mismatched types //~| ERROR mismatched types } struct S2(T); impl S2 { fn map(x: U) -> S2 { Self(x) //~^ ERROR mismatched types //~| ERROR mismatched types } }