trait foo { } fn bar(x: foo) -> foo { return (x as foo::); //~^ ERROR mismatched types: expected `@foo` but found `@foo` //~^^ ERROR mismatched types: expected `@foo` but found `@foo` // This is unfortunate -- new handling of parens means the error message // gets printed twice } fn main() {}