summary refs log tree commit diff
path: root/src/test/compile-fail/trait-cast.rs
blob: 9e15a31d95aa0d7c1b6d85ec2e4919ad55d75e8f (plain)
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() {}