@@ -821,7 +821,6 @@ impl fmt::Display for ValidityConstraint {
821
821
822
822
/// Represents a pattern-tuple under investigation.
823
823
// The three lifetimes are:
824
- // - 'a allocated by us
825
824
// - 'p coming from the input
826
825
// - Cx global compilation context
827
826
#[ derive( derivative:: Derivative ) ]
@@ -835,7 +834,7 @@ struct PatStack<'p, Cx: TypeCx> {
835
834
relevant : bool ,
836
835
}
837
836
838
- impl < ' a , ' p , Cx : TypeCx > PatStack < ' p , Cx > {
837
+ impl < ' p , Cx : TypeCx > PatStack < ' p , Cx > {
839
838
fn from_pattern ( pat : & ' p DeconstructedPat < ' p , Cx > ) -> Self {
840
839
PatStack { pats : smallvec ! [ pat] , relevant : true }
841
840
}
@@ -870,7 +869,7 @@ impl<'a, 'p, Cx: TypeCx> PatStack<'p, Cx> {
870
869
/// Only call if `ctor.is_covered_by(self.head().ctor())` is true.
871
870
fn pop_head_constructor (
872
871
& self ,
873
- pcx : & PlaceCtxt < ' a , ' p , Cx > ,
872
+ pcx : & PlaceCtxt < ' _ , ' p , Cx > ,
874
873
ctor : & Constructor < Cx > ,
875
874
ctor_is_relevant : bool ,
876
875
) -> PatStack < ' p , Cx > {
@@ -914,7 +913,7 @@ struct MatrixRow<'p, Cx: TypeCx> {
914
913
useful : bool ,
915
914
}
916
915
917
- impl < ' a , ' p , Cx : TypeCx > MatrixRow < ' p , Cx > {
916
+ impl < ' p , Cx : TypeCx > MatrixRow < ' p , Cx > {
918
917
fn is_empty ( & self ) -> bool {
919
918
self . pats . is_empty ( )
920
919
}
@@ -946,7 +945,7 @@ impl<'a, 'p, Cx: TypeCx> MatrixRow<'p, Cx> {
946
945
/// Only call if `ctor.is_covered_by(self.head().ctor())` is true.
947
946
fn pop_head_constructor (
948
947
& self ,
949
- pcx : & PlaceCtxt < ' a , ' p , Cx > ,
948
+ pcx : & PlaceCtxt < ' _ , ' p , Cx > ,
950
949
ctor : & Constructor < Cx > ,
951
950
ctor_is_relevant : bool ,
952
951
parent_row : usize ,
@@ -989,7 +988,7 @@ struct Matrix<'p, Cx: TypeCx> {
989
988
place_validity : SmallVec < [ ValidityConstraint ; 2 ] > ,
990
989
}
991
990
992
- impl < ' a , ' p , Cx : TypeCx > Matrix < ' p , Cx > {
991
+ impl < ' p , Cx : TypeCx > Matrix < ' p , Cx > {
993
992
/// Pushes a new row to the matrix. If the row starts with an or-pattern, this recursively
994
993
/// expands it. Internal method, prefer [`Matrix::new`].
995
994
fn expand_and_push ( & mut self , row : MatrixRow < ' p , Cx > ) {
@@ -1006,7 +1005,7 @@ impl<'a, 'p, Cx: TypeCx> Matrix<'p, Cx> {
1006
1005
/// Build a new matrix from an iterator of `MatchArm`s.
1007
1006
fn new (
1008
1007
wildcard_arena : & ' p TypedArena < DeconstructedPat < ' p , Cx > > ,
1009
- arms : & ' a [ MatchArm < ' p , Cx > ] ,
1008
+ arms : & [ MatchArm < ' p , Cx > ] ,
1010
1009
scrut_ty : Cx :: Ty ,
1011
1010
scrut_validity : ValidityConstraint ,
1012
1011
) -> Self {
@@ -1029,7 +1028,7 @@ impl<'a, 'p, Cx: TypeCx> Matrix<'p, Cx> {
1029
1028
matrix
1030
1029
}
1031
1030
1032
- fn head_ty ( & self , mcx : MatchCtxt < ' a , ' p , Cx > ) -> Option < Cx :: Ty > {
1031
+ fn head_ty ( & self , mcx : MatchCtxt < ' _ , ' p , Cx > ) -> Option < Cx :: Ty > {
1033
1032
if self . column_count ( ) == 0 {
1034
1033
return None ;
1035
1034
}
@@ -1056,16 +1055,14 @@ impl<'a, 'p, Cx: TypeCx> Matrix<'p, Cx> {
1056
1055
}
1057
1056
1058
1057
/// Iterate over the first pattern of each row.
1059
- fn heads < ' b > (
1060
- & ' b self ,
1061
- ) -> impl Iterator < Item = & ' b DeconstructedPat < ' p , Cx > > + Clone + Captures < ' a > {
1058
+ fn heads < ' b > ( & ' b self ) -> impl Iterator < Item = & ' b DeconstructedPat < ' p , Cx > > + Clone {
1062
1059
self . rows ( ) . map ( |r| r. head ( ) )
1063
1060
}
1064
1061
1065
1062
/// This computes `specialize(ctor, self)`. See top of the file for explanations.
1066
1063
fn specialize_constructor (
1067
1064
& self ,
1068
- pcx : & PlaceCtxt < ' a , ' p , Cx > ,
1065
+ pcx : & PlaceCtxt < ' _ , ' p , Cx > ,
1069
1066
ctor : & Constructor < Cx > ,
1070
1067
ctor_is_relevant : bool ,
1071
1068
) -> Matrix < ' p , Cx > {
0 commit comments