fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0510]: cannot assign `x` in match guard 2 --> $DIR/borrowck-mutate-in-guard.rs:10:25 3 | 4LL | match x { 5 | - value is immutable in match guard 6LL | Enum::A(_) if { x = Enum::B(false); false } => 1, 7 | ^^^^^^^^^^^^^^^^^^ cannot assign 8 9error[E0510]: cannot mutably borrow `x` in match guard 10 --> $DIR/borrowck-mutate-in-guard.rs:12:33 11 | 12LL | match x { 13 | - value is immutable in match guard 14... 15LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, 16 | ^^^^^^ cannot mutably borrow 17 18error: aborting due to 2 previous errors 19 20For more information about this error, try `rustc --explain E0510`.