rust/tests/ui/pattern/deref-patterns/fake_borrows.stderr
2024-04-20 16:04:05 +02:00

13 lines
386 B
Plaintext

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: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0510`.