3 #![feature(generators)]
4 #![feature(unboxed_closures, fn_traits)]
6 #![allow(non_camel_case_types)]
8 #![allow(unreachable_code)]
9 #![allow(unused_braces, unused_must_use, unused_parens)]
10 #![allow(uncommon_codepoints, confusable_idents)]
12 #![recursion_limit = "256"]
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: &Cell<bool>) {
28 return while !x.get() { x.set(true); };
30 let i = &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() -> usize {
67 fn p() -> bool { true }
68 let _a = (assert!((true)) == (assert!(p())));
69 let _c = (assert!((p())) == ());
70 let _b: bool = (println!("{}", 0) == (return 0));
76 loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => panic!("wat") } }
80 fn evil_lincoln() { let _evil = println!("lincoln"); }
83 assert_eq!(String::from(".................................................."),
84 format!("{:?}", .. .. .. .. .. .. .. .. .. .. .. .. ..
85 .. .. .. .. .. .. .. .. .. .. .. ..));
94 pub fn u8<'u8: 'u8 + 'u8>(u8: &'u8 u8) -> &'u8 u8 {
103 let &u8: &u8 = u8::u8(&8u8);
111 assert_eq!(String::from("><>"),
112 String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>());
116 union union<'union> { union: &'union union<'union>, }
119 fn special_characters() {
120 let val = !((|(..):(_,_),(|__@_|__)|__)((&*"\\",'🤔')/**/,{})=={&[..=..][..];})//
125 fn punch_card() -> impl std::fmt::Debug {
126 ..=..=.. .. .. .. .. .. .. .. .. .. .. ..=.. ..
127 ..=.. ..=.. .. .. .. .. .. .. .. .. ..=..=..=..
128 ..=.. ..=.. ..=.. ..=.. .. ..=..=.. .. ..=.. ..
129 ..=..=.. .. ..=.. ..=.. ..=.. .. .. .. ..=.. ..
130 ..=.. ..=.. ..=.. ..=.. .. ..=.. .. .. ..=.. ..
131 ..=.. ..=.. ..=.. ..=.. .. .. ..=.. .. ..=.. ..
132 ..=.. ..=.. .. ..=..=.. ..=..=.. .. .. ..=.. ..
136 let val = match match match match match () {
152 yield yield yield yield yield yield yield yield yield;
156 fn match_nested_if() {
158 () if if if if true {true} else {false} {true} else {false} {true} else {false} => true,
165 let val = ()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=();
182 impl FnOnce<()> for foo {
184 extern "rust-call" fn call_once(self, _args: ()) -> Self::Output {
188 let foo = foo () ()() ()()() ()()()() ()()()()();
191 fn bathroom_stall() {
193 matches!(2, _|_|_|_|_|_ if (i+=1) != (i+=1));
210 special_characters();