1 2 3 4 5 6 7 8
trait foo<T> { } fn bar(x: foo<uint>) -> foo<int> { return (x as foo::<int>); //~^ ERROR mismatched types: expected `@foo<int>` but found `@foo<uint>` } fn main() {}