PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-fail/unwind-box-trait.rs

https://bitbucket.org/graydon/rust
Rust | 19 lines | 14 code | 4 blank | 1 comment | 0 complexity | 7ea351417d237c1ea1f04220e044196e MD5 | raw file
  1. // error-pattern:fail
  2. fn failfn() {
  3. fail;
  4. }
  5. trait i {
  6. fn foo();
  7. }
  8. impl ~int: i {
  9. fn foo() { }
  10. }
  11. fn main() {
  12. let x = ~0 as i;
  13. failfn();
  14. log(error, x);
  15. }