3 #![feature(generators)]
4 #![feature(destructuring_assignment)]
6 #![allow(non_camel_case_types)]
8 #![allow(unreachable_code)]
9 #![allow(unused_braces, unused_must_use, unused_parens)]
11 #![recursion_limit = "256"]
16 // Just a grab bag of stuff that you wouldn't want to actually write.
18 fn strange() -> bool { let _x: bool = return true; }
26 fn the(x: &Cell<bool>) {
27 return while !x.get() { x.set(true); };
29 let i = &Cell::new(false);
30 let dont = {||the(i)};
53 if (return) { break; }
59 let mut _y = (_x = 0) == (_x = 0);
60 let mut _z = (_x = 0) < (_x = 0);
61 let _a = (_x += 0) == (_x = 0);
62 let _b = swap(&mut _y, &mut _z) == swap(&mut _y, &mut _z);
65 fn canttouchthis() -> usize {
66 fn p() -> bool { true }
67 let _a = (assert!((true)) == (assert!(p())));
68 let _c = (assert!((p())) == ());
69 let _b: bool = (println!("{}", 0) == (return 0));
75 loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => panic!("wat") } }
79 fn evil_lincoln() { let _evil = println!("lincoln"); }
82 assert_eq!(String::from(".................................................."),
83 format!("{:?}", .. .. .. .. .. .. .. .. .. .. .. .. ..
84 .. .. .. .. .. .. .. .. .. .. .. ..));
93 pub fn u8<'u8: 'u8 + 'u8>(u8: &'u8 u8) -> &'u8 u8 {
102 let &u8: &u8 = u8::u8(&8u8);
110 assert_eq!(String::from("><>"),
111 String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>());
115 union union<'union> { union: &'union union<'union>, }
118 fn special_characters() {
119 let val = !((|(..):(_,_),__@_|__)((&*"\\",'🤔')/**/,{})=={&[..=..][..];})//
124 fn punch_card() -> impl std::fmt::Debug {
125 ..=..=.. .. .. .. .. .. .. .. .. .. .. ..=.. ..
126 ..=.. ..=.. .. .. .. .. .. .. .. .. ..=..=..=..
127 ..=.. ..=.. ..=.. ..=.. .. ..=..=.. .. ..=.. ..
128 ..=..=.. .. ..=.. ..=.. ..=.. .. .. .. ..=.. ..
129 ..=.. ..=.. ..=.. ..=.. .. ..=.. .. .. ..=.. ..
130 ..=.. ..=.. ..=.. ..=.. .. .. ..=.. .. ..=.. ..
131 ..=.. ..=.. .. ..=..=.. ..=..=.. .. .. ..=.. ..
135 let val = match match match match match () {
151 yield yield yield yield yield yield yield yield yield;
155 fn match_nested_if() {
157 () if if if if true {true} else {false} {true} else {false} {true} else {false} => true,
164 let val = ()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=();
181 special_characters();