1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 // Don't try to clean up uninitialized locals
17 fn test_break() { loop { let _x: Box<int> = break; }
}
19 fn test_cont() { let mut i = 0; while i < 1 { i += 1; let _x: Box<int> = continue; }
}
21 fn test_ret() { let _x: Box<int> = return; }
24 fn f() { let _x: Box<int> = panic!(); }
25 thread
::spawn(move|| f() ).join().err().unwrap();
28 fn test_panic_indirect() {
29 fn f() -> ! { panic!(); }
30 fn g() { let _x: Box<int> = f(); }
31 thread
::spawn(move|| g() ).join().err().unwrap();
39 test_panic_indirect();