// This test checks that genuine type errors with partial // type hints are understandable. use std::marker::PhantomData; struct Foo(PhantomData); struct Bar(PhantomData); pub fn main() { } fn test1() { let x: Foo<_> = Bar::(PhantomData); //~^ ERROR mismatched types //~| expected struct `Foo<_>` //~| found struct `Bar` //~| expected `Foo<_>`, found `Bar` let y: Foo = x; } fn test2() { let x: Foo<_> = Bar::(PhantomData); //~^ ERROR mismatched types //~| expected struct `Foo<_>` //~| found struct `Bar` //~| expected `Foo<_>`, found `Bar` }