Files
rust/tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/ref-binding-on-inh-ref-errors.structural2021.stderr
dianne e24833a4a8 add test revisions for old-edition behavior of feature gates
This also adds `#[cfg]` attributes to tests for bindings' types,
to make it visually clearer which revisions type successfully.
2025-02-18 17:44:28 -08:00

10 lines
310 B
Plaintext

error[E0596]: cannot borrow data in a `&` reference as mutable
--> $DIR/ref-binding-on-inh-ref-errors.rs:71:10
|
LL | let [ref mut x] = &[0];
| ^^^^^^^^^ cannot borrow as mutable
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.