-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Pattern Migration 2024: reword to make sense on all Editions #136475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
724b885
bdc6c4d
bbe40ac
9202001
4331f55
203d310
a064e78
767f820
a5cc4cb
060cc37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:60:10 | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:54:10 | ||
| | ||
LL | let [&mut ref x] = &[&mut 0]; | ||
| ^^^^^ | ||
|
@@ -10,11 +10,11 @@ help: replace this `&mut` pattern with `&` | |
LL | let [&ref x] = &[&mut 0]; | ||
| ~ | ||
|
||
error: this pattern relies on behavior which may change in edition 2024 | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:74:10 | ||
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]; | ||
| ^^^^^^^ cannot override to bind by-reference when that is the implicit default | ||
| ^^^^^^^ 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 | ||
|
@@ -23,40 +23,40 @@ LL | let &[ref mut x] = &[0]; | |
| + | ||
|
||
error[E0596]: cannot borrow data in a `&` reference as mutable | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:74:10 | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:67:10 | ||
| | ||
LL | let [ref mut x] = &[0]; | ||
| ^^^^^^^^^ cannot borrow as mutable | ||
|
||
error: this pattern relies on behavior which may change in edition 2024 | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:83:10 | ||
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]; | ||
| ^^^ cannot override to bind by-reference when that is the implicit default | ||
| ^^^ 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: this pattern relies on behavior which may change in edition 2024 | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:88:10 | ||
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]; | ||
| ^^^ cannot override to bind by-reference when that is the implicit default | ||
| ^^^ 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: this pattern relies on behavior which may change in edition 2024 | ||
--> $DIR/ref-binding-on-inh-ref-errors.rs:93:10 | ||
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]; | ||
| ^^^^^^^ cannot override to bind by-reference when that is the implicit default | ||
| ^^^^^^^ 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 | ||
|
Uh oh!
There was an error while loading. Please reload this page.