rust/src/test/run-fail/unwind-box-trait.rs
2012-08-02 17:58:56 -07:00

19 lines
185 B
Rust

// error-pattern:fail
fn failfn() {
fail;
}
trait i {
fn foo();
}
impl of i for ~int {
fn foo() { }
}
fn main() {
let x = ~0 as i;
failfn();
log(error, x);
}