@@ -342,7 +342,7 @@ LL | let &[&(_)] = &[&0];
342342 | +
343343
344344error: binding modifiers may only be written when the default binding mode is `move` in Rust 2024
345- --> $DIR/migration_lint.rs:157 :18
345+ --> $DIR/migration_lint.rs:155 :18
346346 |
347347LL | let Struct { ref a, ref b, c } = &Struct { a: 0, b: 0, c: 0 };
348348 | ^^^ ^^^ binding modifier not allowed under `ref` default binding mode
@@ -352,7 +352,7 @@ LL | let Struct { ref a, ref b, c } = &Struct { a: 0, b: 0, c: 0 };
352352 = warning: this changes meaning in Rust 2024
353353 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
354354note: matching on a reference type with a non-reference pattern changes the default binding mode
355- --> $DIR/migration_lint.rs:157 :9
355+ --> $DIR/migration_lint.rs:155 :9
356356 |
357357LL | let Struct { ref a, ref b, c } = &Struct { a: 0, b: 0, c: 0 };
358358 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -363,7 +363,7 @@ LL + let Struct { a, b, c } = &Struct { a: 0, b: 0, c: 0 };
363363 |
364364
365365error: binding modifiers may only be written when the default binding mode is `move` in Rust 2024
366- --> $DIR/migration_lint.rs:164 :18
366+ --> $DIR/migration_lint.rs:162 :18
367367 |
368368LL | let Struct { ref a, ref mut b, c } = &mut Struct { a: 0, b: 0, c: 0 };
369369 | ^^^ ^^^^^^^ binding modifier not allowed under `ref mut` default binding mode
@@ -373,7 +373,7 @@ LL | let Struct { ref a, ref mut b, c } = &mut Struct { a: 0, b: 0, c: 0 };
373373 = warning: this changes meaning in Rust 2024
374374 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
375375note: matching on a reference type with a non-reference pattern changes the default binding mode
376- --> $DIR/migration_lint.rs:164 :9
376+ --> $DIR/migration_lint.rs:162 :9
377377 |
378378LL | let Struct { ref a, ref mut b, c } = &mut Struct { a: 0, b: 0, c: 0 };
379379 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&mut _`
@@ -383,7 +383,7 @@ LL | let &mut Struct { ref a, ref mut b, ref mut c } = &mut Struct { a: 0, b
383383 | ++++ +++++++
384384
385385error: reference patterns may only be written when the default binding mode is `move` in Rust 2024
386- --> $DIR/migration_lint.rs:172 :21
386+ --> $DIR/migration_lint.rs:170 :21
387387 |
388388LL | let Struct { a: &[ref a], b: &mut [[b]], c } = &mut &Struct { a: &[0], b: &mut [&[0]], c: 0 };
389389 | ^ ^^^^ reference pattern not allowed under `ref` default binding mode
@@ -393,7 +393,7 @@ LL | let Struct { a: &[ref a], b: &mut [[b]], c } = &mut &Struct { a: &[0],
393393 = warning: this changes meaning in Rust 2024
394394 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
395395note: matching on a reference type with a non-reference pattern changes the default binding mode
396- --> $DIR/migration_lint.rs:172 :9
396+ --> $DIR/migration_lint.rs:170 :9
397397 |
398398LL | let Struct { a: &[ref a], b: &mut [[b]], c } = &mut &Struct { a: &[0], b: &mut [&[0]], c: 0 };
399399 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -403,15 +403,15 @@ LL | let &mut &Struct { a: &[ref a], b: &mut [&[ref b]], ref c } = &mut &Str
403403 | ++++++ + +++ +++
404404
405405error: reference patterns may only be written when the default binding mode is `move` in Rust 2024
406- --> $DIR/migration_lint.rs:180 :13
406+ --> $DIR/migration_lint.rs:178 :13
407407 |
408408LL | let Foo(&ref a) = &Foo(&0);
409409 | ^ reference pattern not allowed under `ref` default binding mode
410410 |
411411 = warning: this changes meaning in Rust 2024
412412 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
413413note: matching on a reference type with a non-reference pattern changes the default binding mode
414- --> $DIR/migration_lint.rs:180 :9
414+ --> $DIR/migration_lint.rs:178 :9
415415 |
416416LL | let Foo(&ref a) = &Foo(&0);
417417 | ^^^^^^^^^^^ this matches on type `&_`
@@ -421,15 +421,15 @@ LL | let &Foo(&ref a) = &Foo(&0);
421421 | +
422422
423423error: reference patterns may only be written when the default binding mode is `move` in Rust 2024
424- --> $DIR/migration_lint.rs:186 :10
424+ --> $DIR/migration_lint.rs:184 :10
425425 |
426426LL | let (&a, b, [c], [(d, [e])]) = &(&0, 0, &[0], &mut [&mut (0, &[0])]);
427427 | ^ reference pattern not allowed under `ref` default binding mode
428428 |
429429 = warning: this changes meaning in Rust 2024
430430 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
431431note: matching on a reference type with a non-reference pattern changes the default binding mode
432- --> $DIR/migration_lint.rs:186 :9
432+ --> $DIR/migration_lint.rs:184 :9
433433 |
434434LL | let (&a, b, [c], [(d, [e])]) = &(&0, 0, &[0], &mut [&mut (0, &[0])]);
435435 | ^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -439,15 +439,15 @@ LL | let &(&a, ref b, &[ref c], &mut [&mut (ref d, &[ref e])]) = &(&0, 0, &[
439439 | + +++ + +++ ++++ ++++ +++ + +++
440440
441441error: binding modifiers may only be written when the default binding mode is `move` in Rust 2024
442- --> $DIR/migration_lint.rs:196 :19
442+ --> $DIR/migration_lint.rs:194 :19
443443 |
444444LL | let (a, [b], [mut c]) = &(0, &mut [0], &[0]);
445445 | ^^^ binding modifier not allowed under `ref` default binding mode
446446 |
447447 = warning: this changes meaning in Rust 2024
448448 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
449449note: matching on a reference type with a non-reference pattern changes the default binding mode
450- --> $DIR/migration_lint.rs:196 :9
450+ --> $DIR/migration_lint.rs:194 :9
451451 |
452452LL | let (a, [b], [mut c]) = &(0, &mut [0], &[0]);
453453 | ^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -457,7 +457,7 @@ LL | let &(ref a, &mut [ref b], &[mut c]) = &(0, &mut [0], &[0]);
457457 | + +++ ++++ +++ +
458458
459459error: reference patterns may only be written when the default binding mode is `move` in Rust 2024
460- --> $DIR/migration_lint.rs:204 :10
460+ --> $DIR/migration_lint.rs:202 :10
461461 |
462462LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
463463 | ^ ^ reference pattern not allowed under `ref` default binding mode
@@ -467,7 +467,7 @@ LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
467467 = warning: this changes meaning in Rust 2024
468468 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
469469note: matching on a reference type with a non-reference pattern changes the default binding mode
470- --> $DIR/migration_lint.rs:204 :9
470+ --> $DIR/migration_lint.rs:202 :9
471471 |
472472LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
473473 | ^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -477,15 +477,15 @@ LL | let &(&a, &mut (ref b, &[ref c])) = &(&0, &mut (0, &[0]));
477477 | + ++++ +++
478478
479479error: binding modifiers may only be written when the default binding mode is `move` in Rust 2024
480- --> $DIR/migration_lint.rs:212 :10
480+ --> $DIR/migration_lint.rs:210 :10
481481 |
482482LL | let [mut a @ b] = &[0];
483483 | ^^^ binding modifier not allowed under `ref` default binding mode
484484 |
485485 = warning: this changes meaning in Rust 2024
486486 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
487487note: matching on a reference type with a non-reference pattern changes the default binding mode
488- --> $DIR/migration_lint.rs:212 :9
488+ --> $DIR/migration_lint.rs:210 :9
489489 |
490490LL | let [mut a @ b] = &[0];
491491 | ^^^^^^^^^^^ this matches on type `&_`
@@ -495,15 +495,15 @@ LL | let &[mut a @ ref b] = &[0];
495495 | + +++
496496
497497error: binding modifiers may only be written when the default binding mode is `move` in Rust 2024
498- --> $DIR/migration_lint.rs:219 :14
498+ --> $DIR/migration_lint.rs:217 :14
499499 |
500500LL | let [a @ mut b] = &[0];
501501 | ^^^ binding modifier not allowed under `ref` default binding mode
502502 |
503503 = warning: this changes meaning in Rust 2024
504504 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
505505note: matching on a reference type with a non-reference pattern changes the default binding mode
506- --> $DIR/migration_lint.rs:219 :9
506+ --> $DIR/migration_lint.rs:217 :9
507507 |
508508LL | let [a @ mut b] = &[0];
509509 | ^^^^^^^^^^^ this matches on type `&_`
@@ -513,7 +513,7 @@ LL | let &[ref a @ mut b] = &[0];
513513 | + +++
514514
515515error: reference patterns may only be written when the default binding mode is `move` in Rust 2024
516- --> $DIR/migration_lint.rs:226 :14
516+ --> $DIR/migration_lint.rs:224 :14
517517 |
518518LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
519519 | ^ ^ reference pattern not allowed under `ref` default binding mode
@@ -523,12 +523,12 @@ LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
523523 = warning: this changes meaning in Rust 2024
524524 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
525525note: matching on a reference type with a non-reference pattern changes the default binding mode
526- --> $DIR/migration_lint.rs:226 :31
526+ --> $DIR/migration_lint.rs:224 :31
527527 |
528528LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
529529 | ^^^^^^^^^^^^^^^ this matches on type `&_`
530530note: matching on a reference type with a non-reference pattern changes the default binding mode
531- --> $DIR/migration_lint.rs:226 :10
531+ --> $DIR/migration_lint.rs:224 :10
532532 |
533533LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
534534 | ^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -538,7 +538,7 @@ LL | let [&Foo(&ref a @ ref b), &Foo(&ref c @ d)] = [&Foo(&0); 2];
538538 | + +
539539
540540error: reference patterns may only be written when the default binding mode is `move` in Rust 2024
541- --> $DIR/migration_lint.rs:235 :14
541+ --> $DIR/migration_lint.rs:233 :14
542542 |
543543LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
544544 | ^ ^ reference pattern not allowed under `ref` default binding mode
@@ -548,12 +548,12 @@ LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
548548 = warning: this changes meaning in Rust 2024
549549 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
550550note: matching on a reference type with a non-reference pattern changes the default binding mode
551- --> $DIR/migration_lint.rs:235 :33
551+ --> $DIR/migration_lint.rs:233 :33
552552 |
553553LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
554554 | ^^^^^^^^^^^^^^^^^ this matches on type `&_`
555555note: matching on a reference type with a non-reference pattern changes the default binding mode
556- --> $DIR/migration_lint.rs:235 :10
556+ --> $DIR/migration_lint.rs:233 :10
557557 |
558558LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
559559 | ^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
0 commit comments