Files
rust/tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/ref-binding-on-inh-ref-errors.structural2024.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

175 lines
6.1 KiB
Plaintext
Raw Normal View History

error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:15:11
|
LL | let [&ref x] = &[&0];
| --^^^---
| | |
| | this binding modifier
| default binding mode is `ref`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &[&ref x] = &[&0];
| +
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:20:11
|
LL | let [&ref x] = &mut [&0];
| --^^^---
| | |
| | this binding modifier
| default binding mode is `ref mut`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &mut [&ref x] = &mut [&0];
| ++++
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:25:15
|
LL | let [&mut ref x] = &mut [&mut 0];
| ------^^^---
| | |
| | this binding modifier
| default binding mode is `ref mut`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &mut [&mut ref x] = &mut [&mut 0];
| ++++
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:30:15
|
LL | let [&mut ref mut x] = &mut [&mut 0];
| ------^^^^^^^---
| | |
| | this binding modifier
| default binding mode is `ref mut`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &mut [&mut ref mut x] = &mut [&mut 0];
| ++++
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:39:11
|
LL | let [&ref x] = &[&mut 0];
| --^^^---
| | |
| | this binding modifier
| default binding mode is `ref`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &[&ref x] = &[&mut 0];
| +
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:45:11
|
LL | let [&ref x] = &mut [&mut 0];
| --^^^---
| | |
| | this binding modifier
| default binding mode is `ref mut`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &mut [&ref x] = &mut [&mut 0];
| ++++
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:54:15
|
LL | let [&mut ref x] = &[&mut 0];
| ------^^^---
| | |
| | this binding modifier
| default binding mode is `ref`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &[&mut ref x] = &[&mut 0];
| +
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:67:10
|
LL | let [ref mut x] = &[0];
| -^^^^^^^---
| ||
| |this binding modifier
| default binding mode is `ref`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &[ref mut x] = &[0];
| +
error[E0596]: cannot borrow data in a `&` reference as mutable
--> $DIR/ref-binding-on-inh-ref-errors.rs:67:10
|
LL | let [ref mut x] = &[0];
| ^^^^^^^^^ cannot borrow as mutable
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:75:10
|
LL | let [ref x] = &[0];
| -^^^---
| ||
| |this binding modifier
| default binding mode is `ref`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &[ref x] = &[0];
| +
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:79:10
|
LL | let [ref x] = &mut [0];
| -^^^---
| ||
| |this binding modifier
| default binding mode is `ref mut`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &mut [ref x] = &mut [0];
| ++++
error: binding modifiers may only be written when the default binding mode is `move`
--> $DIR/ref-binding-on-inh-ref-errors.rs:83:10
|
LL | let [ref mut x] = &mut [0];
| -^^^^^^^---
| ||
| |this binding modifier
| default binding mode is `ref mut`
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
help: make the implied reference pattern explicit
|
LL | let &mut [ref mut x] = &mut [0];
| ++++
error: aborting due to 12 previous errors
For more information about this error, try `rustc --explain E0596`.