2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
2025-01-21 06:27:11 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:15:11
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
LL | let [&ref x] = &[&0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:15:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&ref x] = &[&0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^ this matches on type `&_`
|
2025-01-04 01:38:17 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
|
|
|
|
LL | let &[&ref x] = &[&0];
|
|
|
|
|
| +
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:20:11
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let [&ref x] = &mut [&0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:20:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&ref x] = &mut [&0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^ this matches on type `&mut _`
|
2025-01-04 01:38:17 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let &mut [&ref x] = &mut [&0];
|
|
|
|
|
| ++++
|
2025-01-04 01:38:17 -08:00
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:25:15
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let [&mut ref x] = &mut [&mut 0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref mut` default binding mode
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:25:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&mut ref x] = &mut [&mut 0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^^^^^ this matches on type `&mut _`
|
2025-01-04 01:38:17 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let &mut [&mut ref x] = &mut [&mut 0];
|
2025-01-04 01:38:17 -08:00
|
|
|
| ++++
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:30:15
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let [&mut ref mut x] = &mut [&mut 0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^^^^^ binding modifier not allowed under `ref mut` default binding mode
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:30:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&mut ref mut x] = &mut [&mut 0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^^^^^^^^^ this matches on type `&mut _`
|
2025-01-04 01:38:17 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let &mut [&mut ref mut x] = &mut [&mut 0];
|
2025-01-04 01:38:17 -08:00
|
|
|
| ++++
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:39:11
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let [&ref x] = &[&mut 0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:39:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&ref x] = &[&mut 0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^ this matches on type `&_`
|
2025-01-04 01:38:17 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let &[&ref x] = &[&mut 0];
|
|
|
|
|
| +
|
2025-01-04 01:38:17 -08:00
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:45:11
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let [&ref x] = &mut [&mut 0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-04 01:38:17 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:45:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&ref x] = &mut [&mut 0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^ this matches on type `&mut _`
|
2025-01-04 01:38:17 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
2025-01-21 02:07:32 -08:00
|
|
|
LL | let &mut [&ref x] = &mut [&mut 0];
|
2025-01-04 01:38:17 -08:00
|
|
|
| ++++
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:54:15
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
LL | let [&mut ref x] = &[&mut 0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:54:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [&mut ref x] = &[&mut 0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^^^^^ this matches on type `&_`
|
2025-01-21 06:27:11 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
|
|
|
|
LL | let &[&mut ref x] = &[&mut 0];
|
|
|
|
|
| +
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:67:10
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
LL | let [ref mut x] = &[0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^^^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:67:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [ref mut x] = &[0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^^^^ this matches on type `&_`
|
2025-01-21 06:27:11 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
|
|
|
|
LL | let &[ref mut x] = &[0];
|
|
|
|
|
| +
|
|
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow data in a `&` reference as mutable
|
2025-02-03 01:50:14 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:67:10
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
LL | let [ref mut x] = &[0];
|
|
|
|
|
| ^^^^^^^^^ cannot borrow as mutable
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:75:10
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
LL | let [ref x] = &[0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref` default binding mode
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:75:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [ref x] = &[0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^ this matches on type `&_`
|
2025-01-21 06:27:11 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
|
|
|
|
LL | let &[ref x] = &[0];
|
|
|
|
|
| +
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:79:10
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
LL | let [ref x] = &mut [0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^ binding modifier not allowed under `ref mut` default binding mode
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:79:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [ref x] = &mut [0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^ this matches on type `&mut _`
|
2025-01-21 06:27:11 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
|
|
|
|
LL | let &mut [ref x] = &mut [0];
|
|
|
|
|
| ++++
|
|
|
|
|
|
2025-02-03 01:50:14 -08:00
|
|
|
error: binding modifiers may only be written when the default binding mode is `move`
|
|
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:83:10
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
LL | let [ref mut x] = &mut [0];
|
2025-02-05 01:12:40 -08:00
|
|
|
| ^^^^^^^ binding modifier not allowed under `ref mut` default binding mode
|
2025-01-21 06:27:11 -08:00
|
|
|
|
|
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
|
2025-02-05 09:05:39 -08:00
|
|
|
note: matching on a reference type with a non-reference pattern changes the default binding mode
|
2025-02-05 01:12:40 -08:00
|
|
|
--> $DIR/ref-binding-on-inh-ref-errors.rs:83:9
|
|
|
|
|
|
|
|
|
|
|
LL | let [ref mut x] = &mut [0];
|
2025-02-05 09:05:39 -08:00
|
|
|
| ^^^^^^^^^^^ this matches on type `&mut _`
|
2025-01-21 06:27:11 -08:00
|
|
|
help: make the implied reference pattern explicit
|
|
|
|
|
|
|
|
|
|
|
LL | let &mut [ref mut x] = &mut [0];
|
|
|
|
|
| ++++
|
|
|
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
2025-01-04 01:38:17 -08:00
|
|
|
|
2025-01-21 06:27:11 -08:00
|
|
|
For more information about this error, try `rustc --explain E0596`.
|