rust/tests/ui/pattern/deref-patterns/fake_borrows.stderr

21 lines
657 B
Text

error[E0510]: cannot assign `*b` in match guard
--> $DIR/fake_borrows.rs:9:16
|
LL | match b {
| - value is immutable in match guard
LL | deref!(true) => {}
LL | _ if { *b = true; false } => {}
| ^^^^^^^^^ cannot assign
error[E0510]: cannot assign `*b` in match guard
--> $DIR/fake_borrows.rs:16:16
|
LL | match b {
| - value is immutable in match guard
LL | true => {}
LL | _ if { *b = true; false } => {}
| ^^^^^^^^^ cannot assign
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0510`.