File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -63,20 +63,12 @@ impl X {
6363
6464// Methods implementing traits must have matching lifetimes
6565mod issue4291 {
66- #[ derive( Debug ) ]
67- pub struct Foo < ' a > ( & ' a std:: marker:: PhantomData < u8 > ) ;
68-
69- #[ derive( Debug ) ]
70- pub struct Bar < ' a : ' b , ' b > ( Foo < ' a > , & ' b std:: marker:: PhantomData < u8 > ) ;
71-
72- trait LT {
73- fn test < ' a : ' b , ' b > ( foo : & Foo < ' a > , bar : & Bar < ' a , ' b > ) ;
66+ trait BadTrait {
67+ fn unused_lt < ' a > ( x : u8 ) { }
7468 }
7569
76- pub struct Baz ;
77-
78- impl LT for Baz {
79- fn test < ' a : ' b , ' b > ( _foo : & Foo , _bar : & Bar ) { }
70+ impl BadTrait for ( ) {
71+ fn unused_lt < ' a > ( _x : u8 ) { }
8072 }
8173}
8274
Original file line number Diff line number Diff line change @@ -18,5 +18,11 @@ error: this lifetime isn't used in the function definition
1818LL | fn x<'a>(&self) {}
1919 | ^^
2020
21- error: aborting due to 3 previous errors
21+ error: this lifetime isn't used in the function definition
22+ --> $DIR/extra_unused_lifetimes.rs:67:22
23+ |
24+ LL | fn unused_lt<'a>(x: u8) {}
25+ | ^^
26+
27+ error: aborting due to 4 previous errors
2228
You can’t perform that action at this time.
0 commit comments