trait foo { } fn bar(x: foo) -> foo { return (x as foo::); //~^ ERROR mismatched types: expected `foo` but found `foo` } fn main() {}