Cannot mutate place in this match guard.
When matching on a variable it cannot be mutated in the match guards, as this could cause the match to be non-exhaustive:
let mut x = Some(0); match x { None => (), Some(_) if { x = None; false } => (), Some(v) => (), // No longer matches }
Here executing x = None
would modify the value being matched and require us to go “back in time” to the None
arm.