@@ -2,7 +2,10 @@ error: binding modifiers may only be written when the default binding mode is `m
2
2
--> $DIR/migration_lint.rs:25:13
3
3
|
4
4
LL | let Foo(mut x) = &Foo(0);
5
- | ^^^ default binding mode is `ref`
5
+ | ^^^--
6
+ | |
7
+ | this binding modifier
8
+ | default binding mode is `ref`
6
9
|
7
10
= warning: this changes meaning in Rust 2024
8
11
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -20,7 +23,10 @@ error: binding modifiers may only be written when the default binding mode is `m
20
23
--> $DIR/migration_lint.rs:30:13
21
24
|
22
25
LL | let Foo(mut x) = &mut Foo(0);
23
- | ^^^ default binding mode is `ref mut`
26
+ | ^^^--
27
+ | |
28
+ | this binding modifier
29
+ | default binding mode is `ref mut`
24
30
|
25
31
= warning: this changes meaning in Rust 2024
26
32
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -33,7 +39,10 @@ error: binding modifiers may only be written when the default binding mode is `m
33
39
--> $DIR/migration_lint.rs:35:13
34
40
|
35
41
LL | let Foo(ref x) = &Foo(0);
36
- | ^^^ default binding mode is `ref`
42
+ | ^^^--
43
+ | |
44
+ | this binding modifier
45
+ | default binding mode is `ref`
37
46
|
38
47
= warning: this changes meaning in Rust 2024
39
48
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -46,7 +55,10 @@ error: binding modifiers may only be written when the default binding mode is `m
46
55
--> $DIR/migration_lint.rs:40:13
47
56
|
48
57
LL | let Foo(ref x) = &mut Foo(0);
49
- | ^^^ default binding mode is `ref mut`
58
+ | ^^^--
59
+ | |
60
+ | this binding modifier
61
+ | default binding mode is `ref mut`
50
62
|
51
63
= warning: this changes meaning in Rust 2024
52
64
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -59,7 +71,10 @@ error: reference patterns may only be written when the default binding mode is `
59
71
--> $DIR/migration_lint.rs:57:13
60
72
|
61
73
LL | let Foo(&x) = &Foo(&0);
62
- | ^ default binding mode is `ref`
74
+ | ^-
75
+ | |
76
+ | this reference pattern
77
+ | default binding mode is `ref`
63
78
|
64
79
= warning: this changes meaning in Rust 2024
65
80
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -72,7 +87,10 @@ error: reference patterns may only be written when the default binding mode is `
72
87
--> $DIR/migration_lint.rs:62:13
73
88
|
74
89
LL | let Foo(&mut x) = &Foo(&mut 0);
75
- | ^^^^ default binding mode is `ref`
90
+ | ^^^^--
91
+ | |
92
+ | this reference pattern
93
+ | default binding mode is `ref`
76
94
|
77
95
= warning: this changes meaning in Rust 2024
78
96
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -85,7 +103,10 @@ error: reference patterns may only be written when the default binding mode is `
85
103
--> $DIR/migration_lint.rs:67:13
86
104
|
87
105
LL | let Foo(&x) = &mut Foo(&0);
88
- | ^ default binding mode is `ref mut`
106
+ | ^-
107
+ | |
108
+ | this reference pattern
109
+ | default binding mode is `ref mut`
89
110
|
90
111
= warning: this changes meaning in Rust 2024
91
112
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -98,7 +119,10 @@ error: reference patterns may only be written when the default binding mode is `
98
119
--> $DIR/migration_lint.rs:72:13
99
120
|
100
121
LL | let Foo(&mut x) = &mut Foo(&mut 0);
101
- | ^^^^ default binding mode is `ref mut`
122
+ | ^^^^--
123
+ | |
124
+ | this reference pattern
125
+ | default binding mode is `ref mut`
102
126
|
103
127
= warning: this changes meaning in Rust 2024
104
128
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -111,7 +135,10 @@ error: reference patterns may only be written when the default binding mode is `
111
135
--> $DIR/migration_lint.rs:81:17
112
136
|
113
137
LL | if let Some(&x) = &&&&&Some(&0u8) {
114
- | ^ default binding mode is `ref`
138
+ | ^-
139
+ | |
140
+ | this reference pattern
141
+ | default binding mode is `ref`
115
142
|
116
143
= warning: this changes meaning in Rust 2024
117
144
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -124,7 +151,10 @@ error: reference patterns may only be written when the default binding mode is `
124
151
--> $DIR/migration_lint.rs:87:17
125
152
|
126
153
LL | if let Some(&mut x) = &&&&&Some(&mut 0u8) {
127
- | ^^^^ default binding mode is `ref`
154
+ | ^^^^--
155
+ | |
156
+ | this reference pattern
157
+ | default binding mode is `ref`
128
158
|
129
159
= warning: this changes meaning in Rust 2024
130
160
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -137,7 +167,10 @@ error: reference patterns may only be written when the default binding mode is `
137
167
--> $DIR/migration_lint.rs:93:17
138
168
|
139
169
LL | if let Some(&x) = &&&&&mut Some(&0u8) {
140
- | ^ default binding mode is `ref`
170
+ | ^-
171
+ | |
172
+ | this reference pattern
173
+ | default binding mode is `ref`
141
174
|
142
175
= warning: this changes meaning in Rust 2024
143
176
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -150,7 +183,10 @@ error: reference patterns may only be written when the default binding mode is `
150
183
--> $DIR/migration_lint.rs:99:17
151
184
|
152
185
LL | if let Some(&mut Some(Some(x))) = &mut Some(&mut Some(&mut Some(0u8))) {
153
- | ^^^^ default binding mode is `ref mut`
186
+ | ^^^^--------------
187
+ | |
188
+ | this reference pattern
189
+ | default binding mode is `ref mut`
154
190
|
155
191
= warning: this changes meaning in Rust 2024
156
192
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -163,7 +199,10 @@ error: binding modifiers may only be written when the default binding mode is `m
163
199
--> $DIR/migration_lint.rs:111:21
164
200
|
165
201
LL | let Struct { a, mut b, c } = &Struct { a: 0, b: 0, c: 0 };
166
- | ^^^ default binding mode is `ref`
202
+ | ^^^--
203
+ | |
204
+ | this binding modifier
205
+ | default binding mode is `ref`
167
206
|
168
207
= warning: this changes meaning in Rust 2024
169
208
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -176,8 +215,11 @@ error: binding modifiers and reference patterns may only be written when the def
176
215
--> $DIR/migration_lint.rs:117:21
177
216
|
178
217
LL | let Struct { a: &a, b, ref c } = &Struct { a: &0, b: &0, c: &0 };
179
- | ^ ^^^ default binding mode is `ref`
180
- | |
218
+ | ^- ^^^--
219
+ | | |
220
+ | | this binding modifier
221
+ | | default binding mode is `ref`
222
+ | this reference pattern
181
223
| default binding mode is `ref`
182
224
|
183
225
= warning: this changes meaning in Rust 2024
@@ -191,8 +233,11 @@ error: reference patterns may only be written when the default binding mode is `
191
233
--> $DIR/migration_lint.rs:124:24
192
234
|
193
235
LL | if let Struct { a: &Some(a), b: Some(&b), c: Some(c) } =
194
- | ^ ^ default binding mode is `ref`
195
- | |
236
+ | ^------- ^-
237
+ | | |
238
+ | | this reference pattern
239
+ | | default binding mode is `ref`
240
+ | this reference pattern
196
241
| default binding mode is `ref`
197
242
|
198
243
= warning: this changes meaning in Rust 2024
@@ -206,8 +251,9 @@ error: binding modifiers may only be written when the default binding mode is `m
206
251
--> $DIR/migration_lint.rs:137:15
207
252
|
208
253
LL | (Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
209
- | ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ occurs within macro expansion
254
+ | ^^^-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ occurs within macro expansion
210
255
| |
256
+ | this binding modifier
211
257
| default binding mode is `ref`
212
258
|
213
259
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -221,8 +267,11 @@ error: binding modifiers and reference patterns may only be written when the def
221
267
--> $DIR/migration_lint.rs:145:10
222
268
|
223
269
LL | let [&mut [ref a]] = &mut [&mut &[0]];
224
- | ^^^^ ^^^ default binding mode is `ref`
225
- | |
270
+ | ^^^^--^^^---
271
+ | | |
272
+ | | this binding modifier
273
+ | | default binding mode is `ref`
274
+ | this reference pattern
226
275
| default binding mode is `ref mut`
227
276
|
228
277
= warning: this changes meaning in Rust 2024
@@ -236,7 +285,10 @@ error: reference patterns may only be written when the default binding mode is `
236
285
--> $DIR/migration_lint.rs:150:10
237
286
|
238
287
LL | let [&(_)] = &[&0];
239
- | ^^ default binding mode is `ref`
288
+ | ^^--
289
+ | |
290
+ | this reference pattern
291
+ | default binding mode is `ref`
240
292
|
241
293
= warning: this changes meaning in Rust 2024
242
294
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
0 commit comments