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
15 // pretty-expanded FIXME #23616
19 fn test_break() { loop { let _x: Box<int> = break; } }
21 fn test_cont() { let mut i = 0; while i < 1 { i += 1; let _x: Box<int> = continue; } }
23 fn test_ret() { let _x: Box<int> = return; }
26 fn f() { let _x: Box<int> = panic!(); }
27 thread::spawn(move|| f() ).join().err().unwrap();
30 fn test_panic_indirect() {
31 fn f() -> ! { panic!(); }
32 fn g() { let _x: Box<int> = f(); }
33 thread::spawn(move|| g() ).join().err().unwrap();
41 test_panic_indirect();