@@ -217,5 +217,160 @@ help: make the implied reference pattern explicit
217217LL | &(Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
218218 | +
219219
220- error: aborting due to 16 previous errors
220+ error: this pattern relies on behavior which may change in edition 2024
221+ --> $DIR/migration_lint.rs:146:18
222+ |
223+ LL | let Struct { ref a, ref b, c } = &Struct { a: 0, b: 0, c: 0 };
224+ | ^^^ ^^^ cannot override to bind by-reference when that is the implicit default
225+ | |
226+ | cannot override to bind by-reference when that is the implicit default
227+ |
228+ = warning: this changes meaning in Rust 2024
229+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
230+ help: make the implied reference pattern and variable binding mode explicit
231+ |
232+ LL | let &Struct { ref a, ref b, ref c } = &Struct { a: 0, b: 0, c: 0 };
233+ | + +++
234+
235+ error: this pattern relies on behavior which may change in edition 2024
236+ --> $DIR/migration_lint.rs:153:18
237+ |
238+ LL | let Struct { ref a, ref mut b, c } = &mut Struct { a: 0, b: 0, c: 0 };
239+ | ^^^ ^^^^^^^ cannot override to bind by-reference when that is the implicit default
240+ | |
241+ | cannot override to bind by-reference when that is the implicit default
242+ |
243+ = warning: this changes meaning in Rust 2024
244+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
245+ help: make the implied reference pattern and variable binding mode explicit
246+ |
247+ LL | let &mut Struct { ref a, ref mut b, ref mut c } = &mut Struct { a: 0, b: 0, c: 0 };
248+ | ++++ +++++++
249+
250+ error: this pattern relies on behavior which may change in edition 2024
251+ --> $DIR/migration_lint.rs:161:21
252+ |
253+ LL | let Struct { a: &[ref a], b: &mut [[b]], c } = &mut &Struct { a: &[0], b: &mut [&[0]], c: 0 };
254+ | ^ ^^^^ cannot implicitly match against multiple layers of reference
255+ | |
256+ | cannot implicitly match against multiple layers of reference
257+ |
258+ = warning: this changes meaning in Rust 2024
259+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
260+ help: make the implied reference patterns and variable binding modes explicit
261+ |
262+ LL | let &mut &Struct { a: &[ref a], b: &mut [&[ref b]], ref c } = &mut &Struct { a: &[0], b: &mut [&[0]], c: 0 };
263+ | ++++++ + +++ +++
264+
265+ error: this pattern relies on behavior which may change in edition 2024
266+ --> $DIR/migration_lint.rs:169:13
267+ |
268+ LL | let Foo(&ref a) = &Foo(&0);
269+ | ^ cannot implicitly match against multiple layers of reference
270+ |
271+ = warning: this changes meaning in Rust 2024
272+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
273+ help: make the implied reference pattern explicit
274+ |
275+ LL | let &Foo(&ref a) = &Foo(&0);
276+ | +
277+
278+ error: this pattern relies on behavior which may change in edition 2024
279+ --> $DIR/migration_lint.rs:175:10
280+ |
281+ LL | let (&a, b, [c], [(d, [e])]) = &(&0, 0, &[0], &mut [&mut (0, &[0])]);
282+ | ^ cannot implicitly match against multiple layers of reference
283+ |
284+ = warning: this changes meaning in Rust 2024
285+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
286+ help: make the implied reference patterns and variable binding modes explicit
287+ |
288+ LL | let &(&a, ref b, &[ref c], &mut [&mut (ref d, &[ref e])]) = &(&0, 0, &[0], &mut [&mut (0, &[0])]);
289+ | + +++ + +++ ++++ ++++ +++ + +++
290+
291+ error: this pattern relies on behavior which may change in edition 2024
292+ --> $DIR/migration_lint.rs:185:19
293+ |
294+ LL | let (a, [b], [mut c]) = &(0, &mut [0], &[0]);
295+ | ^^^ requires binding by-value, but the implicit default is by-reference
296+ |
297+ = warning: this changes meaning in Rust 2024
298+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
299+ help: make the implied reference patterns and variable binding modes explicit
300+ |
301+ LL | let &(ref a, &mut [ref b], &[mut c]) = &(0, &mut [0], &[0]);
302+ | + +++ ++++ +++ +
303+
304+ error: this pattern relies on behavior which may change in edition 2024
305+ --> $DIR/migration_lint.rs:193:10
306+ |
307+ LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
308+ | ^ ^ cannot implicitly match against multiple layers of reference
309+ | |
310+ | cannot implicitly match against multiple layers of reference
311+ |
312+ = warning: this changes meaning in Rust 2024
313+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
314+ help: make the implied reference patterns and variable binding mode explicit
315+ |
316+ LL | let &(&a, &mut (ref b, &[ref c])) = &(&0, &mut (0, &[0]));
317+ | + ++++ +++
318+
319+ error: this pattern relies on behavior which may change in edition 2024
320+ --> $DIR/migration_lint.rs:201:10
321+ |
322+ LL | let [mut a @ b] = &[0];
323+ | ^^^ requires binding by-value, but the implicit default is by-reference
324+ |
325+ = warning: this changes meaning in Rust 2024
326+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
327+ help: make the implied reference pattern and variable binding mode explicit
328+ |
329+ LL | let &[mut a @ ref b] = &[0];
330+ | + +++
331+
332+ error: this pattern relies on behavior which may change in edition 2024
333+ --> $DIR/migration_lint.rs:208:14
334+ |
335+ LL | let [a @ mut b] = &[0];
336+ | ^^^ requires binding by-value, but the implicit default is by-reference
337+ |
338+ = warning: this changes meaning in Rust 2024
339+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
340+ help: make the implied reference pattern and variable binding mode explicit
341+ |
342+ LL | let &[ref a @ mut b] = &[0];
343+ | + +++
344+
345+ error: this pattern relies on behavior which may change in edition 2024
346+ --> $DIR/migration_lint.rs:215:14
347+ |
348+ LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
349+ | ^ ^ cannot implicitly match against multiple layers of reference
350+ | |
351+ | cannot implicitly match against multiple layers of reference
352+ |
353+ = warning: this changes meaning in Rust 2024
354+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
355+ help: make the implied reference patterns explicit
356+ |
357+ LL | let [&Foo(&ref a @ ref b), &Foo(&ref c @ d)] = [&Foo(&0); 2];
358+ | + +
359+
360+ error: this pattern relies on behavior which may change in edition 2024
361+ --> $DIR/migration_lint.rs:224:14
362+ |
363+ LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
364+ | ^ ^ cannot implicitly match against multiple layers of reference
365+ | |
366+ | cannot implicitly match against multiple layers of reference
367+ |
368+ = warning: this changes meaning in Rust 2024
369+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
370+ help: make the implied reference patterns explicit
371+ |
372+ LL | let [&Foo(&ref a @ [ref b]), &Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
373+ | + +
374+
375+ error: aborting due to 27 previous errors
221376
0 commit comments