3 #![feature(generators)]
5 #![allow(non_camel_case_types)]
7 #![allow(unreachable_code)]
8 #![allow(unused_braces, unused_parens)]
10 #![recursion_limit = "256"]
15 // Just a grab bag of stuff that you wouldn't want to actually write.
17 fn strange() -> bool { let _x: bool = return true; }
25 fn the(x: &Cell<bool>) {
26 return while !x.get() { x.set(true); };
28 let i = &Cell::new(false);
29 let dont = {||the(i)};
52 if (return) { break; }
58 let mut _y = (_x = 0) == (_x = 0);
59 let mut _z = (_x = 0) < (_x = 0);
60 let _a = (_x += 0) == (_x = 0);
61 let _b = swap(&mut _y, &mut _z) == swap(&mut _y, &mut _z);
64 fn canttouchthis() -> usize {
65 fn p() -> bool { true }
66 let _a = (assert!((true)) == (assert!(p())));
67 let _c = (assert!((p())) == ());
68 let _b: bool = (println!("{}", 0) == (return 0));
74 loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => panic!("wat") } }
78 fn evil_lincoln() { let _evil = println!("lincoln"); }
81 assert_eq!(String::from(".................................................."),
82 format!("{:?}", .. .. .. .. .. .. .. .. .. .. .. .. ..
83 .. .. .. .. .. .. .. .. .. .. .. ..));
92 pub fn u8<'u8: 'u8 + 'u8>(u8: &'u8 u8) -> &'u8 u8 {
101 let &u8: &u8 = u8::u8(&8u8);
109 assert_eq!(String::from("><>"),
110 String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>());
114 union union<'union> { union: &'union union<'union>, }
117 fn special_characters() {
118 let val = !((|(..):(_,_),__@_|__)((&*"\\",'🤔')/**/,{})=={&[..=..][..];})//
123 fn punch_card() -> impl std::fmt::Debug {
124 ..=..=.. .. .. .. .. .. .. .. .. .. .. ..=.. ..
125 ..=.. ..=.. .. .. .. .. .. .. .. .. ..=..=..=..
126 ..=.. ..=.. ..=.. ..=.. .. ..=..=.. .. ..=.. ..
127 ..=..=.. .. ..=.. ..=.. ..=.. .. .. .. ..=.. ..
128 ..=.. ..=.. ..=.. ..=.. .. ..=.. .. .. ..=.. ..
129 ..=.. ..=.. ..=.. ..=.. .. .. ..=.. .. ..=.. ..
130 ..=.. ..=.. .. ..=..=.. ..=..=.. .. .. ..=.. ..
134 let val = match match match match match () {
150 yield yield yield yield yield yield yield yield yield;
154 fn match_nested_if() {
156 () if if if if true {true} else {false} {true} else {false} {true} else {false} => true,
175 special_characters();