// Test the inference errors in case the relevant path // uses a type alias. // // Regression test for #97698. struct Ty(T); impl Ty { fn new() {} } type DirectAlias = Ty; fn direct_alias() { DirectAlias::new() //~^ ERROR type annotations needed } type IndirectAlias = Ty>; fn indirect_alias() { IndirectAlias::new(); // FIXME: This should also emit an error. // // Added it separately as `type-alias-indirect.rs` // where it does error. } struct TyDefault(T, U); impl TyDefault { fn new() {} } type DirectButWithDefaultAlias = TyDefault; fn direct_but_with_default_alias() { DirectButWithDefaultAlias::new(); //~^ ERROR type annotations needed } fn main() {}