2 // Regression test for broken MIR error (#61442)
3 // Due to the two possible evaluation orders for
4 // a '+=' expression (depending on whether or not the 'AddAssign' trait
5 // is being used), we were failing to account for all types that might
6 // possibly be live across a yield point.
8 #![feature(generators)]
12 let mut s = String::new();
18 *{ yield; x } += match String::new() { _ => 0 };
21 // Please don't ever actually write something like this
26 *{ yield (); inner } += match String::new() { _ => 1};
29 } += match String::new() { _ => 2 };