@@ -36,7 +36,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
3636
3737 let ty =
3838 if !lhs_ty. is_ty_var ( ) && !rhs_ty. is_ty_var ( ) && is_builtin_binop ( lhs_ty, rhs_ty, op) {
39- self . enforce_builtin_binop_types ( & lhs. span , lhs_ty, & rhs. span , rhs_ty, op) ;
39+ self . enforce_builtin_binop_types ( lhs. span , lhs_ty, rhs. span , rhs_ty, op) ;
4040 self . tcx . mk_unit ( )
4141 } else {
4242 return_ty
@@ -98,9 +98,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
9898 && is_builtin_binop ( lhs_ty, rhs_ty, op)
9999 {
100100 let builtin_return_ty = self . enforce_builtin_binop_types (
101- & lhs_expr. span ,
101+ lhs_expr. span ,
102102 lhs_ty,
103- & rhs_expr. span ,
103+ rhs_expr. span ,
104104 rhs_ty,
105105 op,
106106 ) ;
@@ -114,9 +114,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
114114
115115 fn enforce_builtin_binop_types (
116116 & self ,
117- lhs_span : & Span ,
117+ lhs_span : Span ,
118118 lhs_ty : Ty < ' tcx > ,
119- rhs_span : & Span ,
119+ rhs_span : Span ,
120120 rhs_ty : Ty < ' tcx > ,
121121 op : hir:: BinOp ,
122122 ) -> Ty < ' tcx > {
@@ -129,8 +129,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
129129 let tcx = self . tcx ;
130130 match BinOpCategory :: from ( op) {
131131 BinOpCategory :: Shortcircuit => {
132- self . demand_suptype ( * lhs_span, tcx. types . bool , lhs_ty) ;
133- self . demand_suptype ( * rhs_span, tcx. types . bool , rhs_ty) ;
132+ self . demand_suptype ( lhs_span, tcx. types . bool , lhs_ty) ;
133+ self . demand_suptype ( rhs_span, tcx. types . bool , rhs_ty) ;
134134 tcx. types . bool
135135 }
136136
@@ -141,13 +141,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
141141
142142 BinOpCategory :: Math | BinOpCategory :: Bitwise => {
143143 // both LHS and RHS and result will have the same type
144- self . demand_suptype ( * rhs_span, lhs_ty, rhs_ty) ;
144+ self . demand_suptype ( rhs_span, lhs_ty, rhs_ty) ;
145145 lhs_ty
146146 }
147147
148148 BinOpCategory :: Comparison => {
149149 // both LHS and RHS and result will have the same type
150- self . demand_suptype ( * rhs_span, lhs_ty, rhs_ty) ;
150+ self . demand_suptype ( rhs_span, lhs_ty, rhs_ty) ;
151151 tcx. types . bool
152152 }
153153 }
0 commit comments