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