@@ -342,7 +342,7 @@ LL | let &[&(_)] = &[&0];
342
342
| +
343
343
344
344
error: 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
346
346
|
347
347
LL | let Struct { ref a, ref b, c } = &Struct { a: 0, b: 0, c: 0 };
348
348
| ^^^ ^^^ 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 };
352
352
= warning: this changes meaning in Rust 2024
353
353
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
354
354
note: 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
356
356
|
357
357
LL | let Struct { ref a, ref b, c } = &Struct { a: 0, b: 0, c: 0 };
358
358
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -363,7 +363,7 @@ LL + let Struct { a, b, c } = &Struct { a: 0, b: 0, c: 0 };
363
363
|
364
364
365
365
error: 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
367
367
|
368
368
LL | let Struct { ref a, ref mut b, c } = &mut Struct { a: 0, b: 0, c: 0 };
369
369
| ^^^ ^^^^^^^ 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 };
373
373
= warning: this changes meaning in Rust 2024
374
374
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
375
375
note: 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
377
377
|
378
378
LL | let Struct { ref a, ref mut b, c } = &mut Struct { a: 0, b: 0, c: 0 };
379
379
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
383
383
| ++++ +++++++
384
384
385
385
error: 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
387
387
|
388
388
LL | let Struct { a: &[ref a], b: &mut [[b]], c } = &mut &Struct { a: &[0], b: &mut [&[0]], c: 0 };
389
389
| ^ ^^^^ 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],
393
393
= warning: this changes meaning in Rust 2024
394
394
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
395
395
note: 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
397
397
|
398
398
LL | let Struct { a: &[ref a], b: &mut [[b]], c } = &mut &Struct { a: &[0], b: &mut [&[0]], c: 0 };
399
399
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -403,15 +403,15 @@ LL | let &mut &Struct { a: &[ref a], b: &mut [&[ref b]], ref c } = &mut &Str
403
403
| ++++++ + +++ +++
404
404
405
405
error: 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
407
407
|
408
408
LL | let Foo(&ref a) = &Foo(&0);
409
409
| ^ reference pattern not allowed under `ref` default binding mode
410
410
|
411
411
= warning: this changes meaning in Rust 2024
412
412
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
413
413
note: 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
415
415
|
416
416
LL | let Foo(&ref a) = &Foo(&0);
417
417
| ^^^^^^^^^^^ this matches on type `&_`
@@ -421,15 +421,15 @@ LL | let &Foo(&ref a) = &Foo(&0);
421
421
| +
422
422
423
423
error: 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
425
425
|
426
426
LL | let (&a, b, [c], [(d, [e])]) = &(&0, 0, &[0], &mut [&mut (0, &[0])]);
427
427
| ^ reference pattern not allowed under `ref` default binding mode
428
428
|
429
429
= warning: this changes meaning in Rust 2024
430
430
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
431
431
note: 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
433
433
|
434
434
LL | let (&a, b, [c], [(d, [e])]) = &(&0, 0, &[0], &mut [&mut (0, &[0])]);
435
435
| ^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -439,15 +439,15 @@ LL | let &(&a, ref b, &[ref c], &mut [&mut (ref d, &[ref e])]) = &(&0, 0, &[
439
439
| + +++ + +++ ++++ ++++ +++ + +++
440
440
441
441
error: 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
443
443
|
444
444
LL | let (a, [b], [mut c]) = &(0, &mut [0], &[0]);
445
445
| ^^^ binding modifier not allowed under `ref` default binding mode
446
446
|
447
447
= warning: this changes meaning in Rust 2024
448
448
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
449
449
note: 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
451
451
|
452
452
LL | let (a, [b], [mut c]) = &(0, &mut [0], &[0]);
453
453
| ^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -457,7 +457,7 @@ LL | let &(ref a, &mut [ref b], &[mut c]) = &(0, &mut [0], &[0]);
457
457
| + +++ ++++ +++ +
458
458
459
459
error: 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
461
461
|
462
462
LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
463
463
| ^ ^ reference pattern not allowed under `ref` default binding mode
@@ -467,7 +467,7 @@ LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
467
467
= warning: this changes meaning in Rust 2024
468
468
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
469
469
note: 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
471
471
|
472
472
LL | let (&a, (b, &[ref c])) = &(&0, &mut (0, &[0]));
473
473
| ^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -477,15 +477,15 @@ LL | let &(&a, &mut (ref b, &[ref c])) = &(&0, &mut (0, &[0]));
477
477
| + ++++ +++
478
478
479
479
error: 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
481
481
|
482
482
LL | let [mut a @ b] = &[0];
483
483
| ^^^ binding modifier not allowed under `ref` default binding mode
484
484
|
485
485
= warning: this changes meaning in Rust 2024
486
486
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
487
487
note: 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
489
489
|
490
490
LL | let [mut a @ b] = &[0];
491
491
| ^^^^^^^^^^^ this matches on type `&_`
@@ -495,15 +495,15 @@ LL | let &[mut a @ ref b] = &[0];
495
495
| + +++
496
496
497
497
error: 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
499
499
|
500
500
LL | let [a @ mut b] = &[0];
501
501
| ^^^ binding modifier not allowed under `ref` default binding mode
502
502
|
503
503
= warning: this changes meaning in Rust 2024
504
504
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
505
505
note: 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
507
507
|
508
508
LL | let [a @ mut b] = &[0];
509
509
| ^^^^^^^^^^^ this matches on type `&_`
@@ -513,7 +513,7 @@ LL | let &[ref a @ mut b] = &[0];
513
513
| + +++
514
514
515
515
error: 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
517
517
|
518
518
LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
519
519
| ^ ^ 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];
523
523
= warning: this changes meaning in Rust 2024
524
524
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
525
525
note: 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
527
527
|
528
528
LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
529
529
| ^^^^^^^^^^^^^^^ this matches on type `&_`
530
530
note: 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
532
532
|
533
533
LL | let [Foo(&ref a @ ref b), Foo(&ref c @ d)] = [&Foo(&0); 2];
534
534
| ^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
@@ -538,7 +538,7 @@ LL | let [&Foo(&ref a @ ref b), &Foo(&ref c @ d)] = [&Foo(&0); 2];
538
538
| + +
539
539
540
540
error: 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
542
542
|
543
543
LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
544
544
| ^ ^ 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];
548
548
= warning: this changes meaning in Rust 2024
549
549
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
550
550
note: 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
552
552
|
553
553
LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
554
554
| ^^^^^^^^^^^^^^^^^ this matches on type `&_`
555
555
note: 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
557
557
|
558
558
LL | let [Foo(&ref a @ [ref b]), Foo(&ref c @ [d])] = [&Foo(&[0]); 2];
559
559
| ^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_`
0 commit comments