You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tests/ui/lint/non_local_definitions.stderr
+36-14
Original file line number
Diff line number
Diff line change
@@ -442,7 +442,29 @@ LL | impl<T> Uto8 for T {}
442
442
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
443
443
444
444
warning: non-local `impl` definition, they should be avoided as they go against expectation
445
-
--> $DIR/non_local_definitions.rs:253:5
445
+
--> $DIR/non_local_definitions.rs:252:9
446
+
|
447
+
LL | impl Uto9 for Test {}
448
+
| ^^^^^^^^^^^^^^^^^^^^^
449
+
|
450
+
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
451
+
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
452
+
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
453
+
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
454
+
455
+
warning: non-local `impl` definition, they should be avoided as they go against expectation
456
+
--> $DIR/non_local_definitions.rs:259:9
457
+
|
458
+
LL | impl Uto10 for Test {}
459
+
| ^^^^^^^^^^^^^^^^^^^^^^
460
+
|
461
+
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
462
+
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
463
+
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
464
+
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
465
+
466
+
warning: non-local `impl` definition, they should be avoided as they go against expectation
467
+
--> $DIR/non_local_definitions.rs:273:5
446
468
|
447
469
LL | / impl Default for UwU<OwO> {
448
470
LL | |
@@ -458,7 +480,7 @@ LL | | }
458
480
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
459
481
460
482
warning: non-local `impl` definition, they should be avoided as they go against expectation
461
-
--> $DIR/non_local_definitions.rs:264:5
483
+
--> $DIR/non_local_definitions.rs:284:5
462
484
|
463
485
LL | / impl From<Cat> for () {
464
486
LL | |
@@ -474,7 +496,7 @@ LL | | }
474
496
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
475
497
476
498
warning: non-local `impl` definition, they should be avoided as they go against expectation
477
-
--> $DIR/non_local_definitions.rs:273:5
499
+
--> $DIR/non_local_definitions.rs:293:5
478
500
|
479
501
LL | / impl AsRef<Cat> for () {
480
502
LL | |
@@ -488,7 +510,7 @@ LL | | }
488
510
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
489
511
490
512
warning: non-local `impl` definition, they should be avoided as they go against expectation
491
-
--> $DIR/non_local_definitions.rs:284:5
513
+
--> $DIR/non_local_definitions.rs:304:5
492
514
|
493
515
LL | / impl PartialEq<B> for G {
494
516
LL | |
@@ -504,7 +526,7 @@ LL | | }
504
526
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
505
527
506
528
warning: non-local `impl` definition, they should be avoided as they go against expectation
507
-
--> $DIR/non_local_definitions.rs:301:5
529
+
--> $DIR/non_local_definitions.rs:321:5
508
530
|
509
531
LL | / impl PartialEq<Dog> for &Dog {
510
532
LL | |
@@ -520,7 +542,7 @@ LL | | }
520
542
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
521
543
522
544
warning: non-local `impl` definition, they should be avoided as they go against expectation
523
-
--> $DIR/non_local_definitions.rs:308:5
545
+
--> $DIR/non_local_definitions.rs:328:5
524
546
|
525
547
LL | / impl PartialEq<()> for Dog {
526
548
LL | |
@@ -536,7 +558,7 @@ LL | | }
536
558
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
537
559
538
560
warning: non-local `impl` definition, they should be avoided as they go against expectation
539
-
--> $DIR/non_local_definitions.rs:315:5
561
+
--> $DIR/non_local_definitions.rs:335:5
540
562
|
541
563
LL | / impl PartialEq<()> for &Dog {
542
564
LL | |
@@ -552,7 +574,7 @@ LL | | }
552
574
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
553
575
554
576
warning: non-local `impl` definition, they should be avoided as they go against expectation
555
-
--> $DIR/non_local_definitions.rs:322:5
577
+
--> $DIR/non_local_definitions.rs:342:5
556
578
|
557
579
LL | / impl PartialEq<Dog> for () {
558
580
LL | |
@@ -568,7 +590,7 @@ LL | | }
568
590
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
569
591
570
592
warning: non-local `impl` definition, they should be avoided as they go against expectation
571
-
--> $DIR/non_local_definitions.rs:344:5
593
+
--> $DIR/non_local_definitions.rs:364:5
572
594
|
573
595
LL | / impl From<Wrap<Wrap<Lion>>> for () {
574
596
LL | |
@@ -584,7 +606,7 @@ LL | | }
584
606
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
585
607
586
608
warning: non-local `impl` definition, they should be avoided as they go against expectation
587
-
--> $DIR/non_local_definitions.rs:351:5
609
+
--> $DIR/non_local_definitions.rs:371:5
588
610
|
589
611
LL | / impl From<()> for Wrap<Lion> {
590
612
LL | |
@@ -600,7 +622,7 @@ LL | | }
600
622
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
601
623
602
624
warning: non-local `impl` definition, they should be avoided as they go against expectation
603
-
--> $DIR/non_local_definitions.rs:364:13
625
+
--> $DIR/non_local_definitions.rs:384:13
604
626
|
605
627
LL | impl MacroTrait for OutsideStruct {}
606
628
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -615,7 +637,7 @@ LL | m!();
615
637
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
616
638
617
639
warning: non-local `impl` definition, they should be avoided as they go against expectation
= note: the macro `non_local_macro::non_local_macro_rules` may come from an old version of the `non_local_macro` crate, try updating your dependency with `cargo update -p non_local_macro`
641
663
= note: this warning originates in the macro `non_local_macro::non_local_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments