File tree 3 files changed +28
-6
lines changed
3 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -658,12 +658,6 @@ fn report_elidable_impl_lifetimes<'tcx>(
658
658
lifetime,
659
659
in_where_predicate : false ,
660
660
..
661
- }
662
- | Usage {
663
- lifetime,
664
- in_bounded_ty : false ,
665
- in_generics_arg : false ,
666
- ..
667
661
} ,
668
662
] = usages. as_slice ( )
669
663
{
Original file line number Diff line number Diff line change @@ -562,4 +562,18 @@ mod rayon {
562
562
}
563
563
}
564
564
565
+ mod issue13749 {
566
+ pub struct Generic<T>(T);
567
+ // Non elidable lifetime
568
+ #[expect(clippy::extra_unused_lifetimes)]
569
+ impl<'a, T> Generic<T> where T: 'a {}
570
+ }
571
+
572
+ mod issue13749bis {
573
+ pub struct Generic<T>(T);
574
+ // Non elidable lifetime
575
+ #[expect(clippy::extra_unused_lifetimes)]
576
+ impl<'a, T: 'a> Generic<T> {}
577
+ }
578
+
565
579
fn main() {}
Original file line number Diff line number Diff line change @@ -562,4 +562,18 @@ mod rayon {
562
562
}
563
563
}
564
564
565
+ mod issue13749 {
566
+ pub struct Generic < T > ( T ) ;
567
+ // Non elidable lifetime
568
+ #[ expect( clippy:: extra_unused_lifetimes) ]
569
+ impl < ' a , T > Generic < T > where T : ' a { }
570
+ }
571
+
572
+ mod issue13749bis {
573
+ pub struct Generic < T > ( T ) ;
574
+ // Non elidable lifetime
575
+ #[ expect( clippy:: extra_unused_lifetimes) ]
576
+ impl < ' a , T : ' a > Generic < T > { }
577
+ }
578
+
565
579
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments