@@ -36,7 +36,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
36
36
37
37
let ty =
38
38
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) ;
40
40
self . tcx . mk_unit ( )
41
41
} else {
42
42
return_ty
@@ -98,9 +98,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
98
98
&& is_builtin_binop ( lhs_ty, rhs_ty, op)
99
99
{
100
100
let builtin_return_ty = self . enforce_builtin_binop_types (
101
- & lhs_expr. span ,
101
+ lhs_expr. span ,
102
102
lhs_ty,
103
- & rhs_expr. span ,
103
+ rhs_expr. span ,
104
104
rhs_ty,
105
105
op,
106
106
) ;
@@ -114,9 +114,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
114
114
115
115
fn enforce_builtin_binop_types (
116
116
& self ,
117
- lhs_span : & Span ,
117
+ lhs_span : Span ,
118
118
lhs_ty : Ty < ' tcx > ,
119
- rhs_span : & Span ,
119
+ rhs_span : Span ,
120
120
rhs_ty : Ty < ' tcx > ,
121
121
op : hir:: BinOp ,
122
122
) -> Ty < ' tcx > {
@@ -129,8 +129,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
129
129
let tcx = self . tcx ;
130
130
match BinOpCategory :: from ( op) {
131
131
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) ;
134
134
tcx. types . bool
135
135
}
136
136
@@ -141,13 +141,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
141
141
142
142
BinOpCategory :: Math | BinOpCategory :: Bitwise => {
143
143
// 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) ;
145
145
lhs_ty
146
146
}
147
147
148
148
BinOpCategory :: Comparison => {
149
149
// 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) ;
151
151
tcx. types . bool
152
152
}
153
153
}
0 commit comments