@@ -75,12 +75,12 @@ struct NonminimalBoolVisitor<'a, 'tcx> {
7575
7676use quine_mc_cluskey:: Bool ;
7777struct Hir2Qmm < ' a , ' tcx , ' v > {
78- terminals : Vec < & ' v Expr > ,
78+ terminals : Vec < & ' v Expr < ' v > > ,
7979 cx : & ' a LateContext < ' a , ' tcx > ,
8080}
8181
8282impl < ' a , ' tcx , ' v > Hir2Qmm < ' a , ' tcx , ' v > {
83- fn extract ( & mut self , op : BinOpKind , a : & [ & ' v Expr ] , mut v : Vec < Bool > ) -> Result < Vec < Bool > , String > {
83+ fn extract ( & mut self , op : BinOpKind , a : & [ & ' v Expr < ' _ > ] , mut v : Vec < Bool > ) -> Result < Vec < Bool > , String > {
8484 for a in a {
8585 if let ExprKind :: Binary ( binop, lhs, rhs) = & a. kind {
8686 if binop. node == op {
@@ -93,7 +93,7 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
9393 Ok ( v)
9494 }
9595
96- fn run ( & mut self , e : & ' v Expr ) -> Result < Bool , String > {
96+ fn run ( & mut self , e : & ' v Expr < ' _ > ) -> Result < Bool , String > {
9797 fn negate ( bin_op_kind : BinOpKind ) -> Option < BinOpKind > {
9898 match bin_op_kind {
9999 BinOpKind :: Eq => Some ( BinOpKind :: Ne ) ,
@@ -154,7 +154,7 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
154154}
155155
156156struct SuggestContext < ' a , ' tcx , ' v > {
157- terminals : & ' v [ & ' v Expr ] ,
157+ terminals : & ' v [ & ' v Expr < ' v > ] ,
158158 cx : & ' a LateContext < ' a , ' tcx > ,
159159 output : String ,
160160}
@@ -222,7 +222,7 @@ impl<'a, 'tcx, 'v> SuggestContext<'a, 'tcx, 'v> {
222222 }
223223}
224224
225- fn simplify_not ( cx : & LateContext < ' _ , ' _ > , expr : & Expr ) -> Option < String > {
225+ fn simplify_not ( cx : & LateContext < ' _ , ' _ > , expr : & Expr < ' _ > ) -> Option < String > {
226226 match & expr. kind {
227227 ExprKind :: Binary ( binop, lhs, rhs) => {
228228 if !implements_ord ( cx, lhs) {
@@ -266,7 +266,7 @@ fn simplify_not(cx: &LateContext<'_, '_>, expr: &Expr) -> Option<String> {
266266 }
267267}
268268
269- fn suggest ( cx : & LateContext < ' _ , ' _ > , suggestion : & Bool , terminals : & [ & Expr ] ) -> String {
269+ fn suggest ( cx : & LateContext < ' _ , ' _ > , suggestion : & Bool , terminals : & [ & Expr < ' _ > ] ) -> String {
270270 let mut suggest_context = SuggestContext {
271271 terminals,
272272 cx,
@@ -332,7 +332,7 @@ fn terminal_stats(b: &Bool) -> Stats {
332332}
333333
334334impl < ' a , ' tcx > NonminimalBoolVisitor < ' a , ' tcx > {
335- fn bool_expr ( & self , e : & ' tcx Expr ) {
335+ fn bool_expr ( & self , e : & ' tcx Expr < ' _ > ) {
336336 let mut h2q = Hir2Qmm {
337337 terminals : Vec :: new ( ) ,
338338 cx : self . cx ,
@@ -437,7 +437,7 @@ impl<'a, 'tcx> NonminimalBoolVisitor<'a, 'tcx> {
437437}
438438
439439impl < ' a , ' tcx > Visitor < ' tcx > for NonminimalBoolVisitor < ' a , ' tcx > {
440- fn visit_expr ( & mut self , e : & ' tcx Expr ) {
440+ fn visit_expr ( & mut self , e : & ' tcx Expr < ' _ > ) {
441441 if in_macro ( e. span ) {
442442 return ;
443443 }
@@ -460,7 +460,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NonminimalBoolVisitor<'a, 'tcx> {
460460 }
461461}
462462
463- fn implements_ord < ' a , ' tcx > ( cx : & ' a LateContext < ' a , ' tcx > , expr : & Expr ) -> bool {
463+ fn implements_ord < ' a , ' tcx > ( cx : & ' a LateContext < ' a , ' tcx > , expr : & Expr < ' _ > ) -> bool {
464464 let ty = cx. tables . expr_ty ( expr) ;
465465 get_trait_def_id ( cx, & paths:: ORD ) . map_or ( false , |id| implements_trait ( cx, ty, id, & [ ] ) )
466466}
@@ -470,7 +470,7 @@ struct NotSimplificationVisitor<'a, 'tcx> {
470470}
471471
472472impl < ' a , ' tcx > Visitor < ' tcx > for NotSimplificationVisitor < ' a , ' tcx > {
473- fn visit_expr ( & mut self , expr : & ' tcx Expr ) {
473+ fn visit_expr ( & mut self , expr : & ' tcx Expr < ' _ > ) {
474474 if let ExprKind :: Unary ( UnNot , inner) = & expr. kind {
475475 if let Some ( suggestion) = simplify_not ( self . cx , inner) {
476476 span_lint_and_sugg (
0 commit comments