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.
11 #![feature(managed_boxes)]
15 use std::gc::{Gc, GC};
17 // Just a grab bag of stuff that you wouldn't want to actually write.
19 fn strange() -> bool { let _x: bool = return true; }
27 fn the(x: Gc<Cell<bool>>) {
28 return while !x.get() { x.set(true); };
30 let i = box(GC) Cell::new(false);
31 let dont = {||the(i)};
54 if (return) { break; }
60 let mut _y = (_x = 0) == (_x = 0);
61 let mut _z = (_x = 0) < (_x = 0);
62 let _a = (_x += 0) == (_x = 0);
63 let _b = swap(&mut _y, &mut _z) == swap(&mut _y, &mut _z);
66 fn canttouchthis() -> uint {
67 fn p() -> bool { true }
68 let _a = (assert!((true)) == (assert!(p())));
69 let _c = (assert!((p())) == ());
70 let _b: bool = (println!("{}", 0) == (return 0u));
76 loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => fail!("wat") } }
80 fn evil_lincoln() { let _evil = println!("lincoln"); }