rust/src/test/compile-fail/trait-cast.rs
2012-08-02 17:58:56 -07:00

9 lines
174 B
Rust

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() {}