| #![feature(if_let_guard)] |
| let mut x = Enum::A(&mut n); |
| Enum::A(_) if { x = Enum::B(false); false } => 1, |
| //~^ ERROR cannot assign `x` in match guard |
| Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, |
| //~^ ERROR cannot mutably borrow `x` in match guard |
| fn if_let_guard() -> isize { |
| let mut x = Enum::A(&mut n); |
| Enum::A(_) if let Some(()) = { x = Enum::B(false); None } => 1, |
| //~^ ERROR cannot assign `x` in match guard |
| Enum::A(_) if let Some(()) = { let y = &mut x; *y = Enum::B(false); None } => 1, |
| //~^ ERROR cannot mutably borrow `x` in match guard |