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
@@ -438,7 +438,29 @@ LL | impl<T> Uto8 for T {}
438
438
= 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>
439
439
440
440
warning: non-local `impl` definition, they should be avoided as they go against expectation
441
-
--> $DIR/non_local_definitions.rs:252:5
441
+
--> $DIR/non_local_definitions.rs:251:9
442
+
|
443
+
LL | impl Uto9 for Test {}
444
+
| ^^^^^^^^^^^^^^^^^^^^^
445
+
|
446
+
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
447
+
= 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
448
+
= 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
449
+
= 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>
450
+
451
+
warning: non-local `impl` definition, they should be avoided as they go against expectation
452
+
--> $DIR/non_local_definitions.rs:258:9
453
+
|
454
+
LL | impl Uto10 for Test {}
455
+
| ^^^^^^^^^^^^^^^^^^^^^^
456
+
|
457
+
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
458
+
= 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
459
+
= 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
460
+
= 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>
461
+
462
+
warning: non-local `impl` definition, they should be avoided as they go against expectation
463
+
--> $DIR/non_local_definitions.rs:272:5
442
464
|
443
465
LL | / impl Default for UwU<OwO> {
444
466
LL | |
@@ -454,7 +476,7 @@ LL | | }
454
476
= 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>
455
477
456
478
warning: non-local `impl` definition, they should be avoided as they go against expectation
457
-
--> $DIR/non_local_definitions.rs:263:5
479
+
--> $DIR/non_local_definitions.rs:283:5
458
480
|
459
481
LL | / impl From<Cat> for () {
460
482
LL | |
@@ -470,7 +492,7 @@ LL | | }
470
492
= 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>
471
493
472
494
warning: non-local `impl` definition, they should be avoided as they go against expectation
473
-
--> $DIR/non_local_definitions.rs:272:5
495
+
--> $DIR/non_local_definitions.rs:292:5
474
496
|
475
497
LL | / impl AsRef<Cat> for () {
476
498
LL | |
@@ -484,7 +506,7 @@ LL | | }
484
506
= 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>
485
507
486
508
warning: non-local `impl` definition, they should be avoided as they go against expectation
487
-
--> $DIR/non_local_definitions.rs:283:5
509
+
--> $DIR/non_local_definitions.rs:303:5
488
510
|
489
511
LL | / impl PartialEq<B> for G {
490
512
LL | |
@@ -500,7 +522,7 @@ LL | | }
500
522
= 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>
501
523
502
524
warning: non-local `impl` definition, they should be avoided as they go against expectation
503
-
--> $DIR/non_local_definitions.rs:300:5
525
+
--> $DIR/non_local_definitions.rs:320:5
504
526
|
505
527
LL | / impl PartialEq<Dog> for &Dog {
506
528
LL | |
@@ -516,7 +538,7 @@ LL | | }
516
538
= 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>
517
539
518
540
warning: non-local `impl` definition, they should be avoided as they go against expectation
519
-
--> $DIR/non_local_definitions.rs:307:5
541
+
--> $DIR/non_local_definitions.rs:327:5
520
542
|
521
543
LL | / impl PartialEq<()> for Dog {
522
544
LL | |
@@ -532,7 +554,7 @@ LL | | }
532
554
= 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>
533
555
534
556
warning: non-local `impl` definition, they should be avoided as they go against expectation
535
-
--> $DIR/non_local_definitions.rs:314:5
557
+
--> $DIR/non_local_definitions.rs:334:5
536
558
|
537
559
LL | / impl PartialEq<()> for &Dog {
538
560
LL | |
@@ -548,7 +570,7 @@ LL | | }
548
570
= 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>
549
571
550
572
warning: non-local `impl` definition, they should be avoided as they go against expectation
551
-
--> $DIR/non_local_definitions.rs:321:5
573
+
--> $DIR/non_local_definitions.rs:341:5
552
574
|
553
575
LL | / impl PartialEq<Dog> for () {
554
576
LL | |
@@ -564,7 +586,7 @@ LL | | }
564
586
= 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>
565
587
566
588
warning: non-local `impl` definition, they should be avoided as they go against expectation
567
-
--> $DIR/non_local_definitions.rs:343:5
589
+
--> $DIR/non_local_definitions.rs:363:5
568
590
|
569
591
LL | / impl From<Wrap<Wrap<Lion>>> for () {
570
592
LL | |
@@ -580,7 +602,7 @@ LL | | }
580
602
= 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>
581
603
582
604
warning: non-local `impl` definition, they should be avoided as they go against expectation
583
-
--> $DIR/non_local_definitions.rs:350:5
605
+
--> $DIR/non_local_definitions.rs:370:5
584
606
|
585
607
LL | / impl From<()> for Wrap<Lion> {
586
608
LL | |
@@ -596,7 +618,7 @@ LL | | }
596
618
= 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>
597
619
598
620
warning: non-local `impl` definition, they should be avoided as they go against expectation
599
-
--> $DIR/non_local_definitions.rs:363:13
621
+
--> $DIR/non_local_definitions.rs:383:13
600
622
|
601
623
LL | impl MacroTrait for OutsideStruct {}
602
624
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -611,7 +633,7 @@ LL | m!();
611
633
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
612
634
613
635
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`
637
659
= 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