@@ -79,7 +79,7 @@ impl<'a, 'tcx> MismatchRelation<'a, 'tcx> {
79
79
let old_ty = self . tcx . type_of ( old_def_id) ;
80
80
let new_ty = self . tcx . type_of ( new_def_id) ;
81
81
debug ! ( "relating item pair" ) ;
82
- let _ = self . relate ( & old_ty, & new_ty) ;
82
+ let _ = self . relate ( old_ty, new_ty) ;
83
83
}
84
84
}
85
85
@@ -118,13 +118,13 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
118
118
fn relate_with_variance < T : Relate < ' tcx > > (
119
119
& mut self ,
120
120
_: ty:: Variance ,
121
- a : & T ,
122
- b : & T ,
121
+ a : T ,
122
+ b : T ,
123
123
) -> RelateResult < ' tcx , T > {
124
124
self . relate ( a, b)
125
125
}
126
126
127
- fn relate < T : Relate < ' tcx > > ( & mut self , a : & T , b : & T ) -> RelateResult < ' tcx , T > {
127
+ fn relate < T : Relate < ' tcx > > ( & mut self , a : T , b : T ) -> RelateResult < ' tcx , T > {
128
128
debug ! ( "relate: mismatch relation: a: {:?}, b: {:?}" , a, b) ;
129
129
Relate :: relate ( self , a, b)
130
130
}
@@ -166,7 +166,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
166
166
{
167
167
let b_field_ty = b_field. ty ( self . tcx , b_substs) ;
168
168
169
- let _ = self . relate ( & a_field_ty, & b_field_ty) ?;
169
+ let _ = self . relate ( a_field_ty, b_field_ty) ?;
170
170
}
171
171
}
172
172
@@ -193,16 +193,16 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
193
193
}
194
194
( & TyKind :: Array ( a_t, _) , & TyKind :: Array ( b_t, _) )
195
195
| ( & TyKind :: Slice ( a_t) , & TyKind :: Slice ( b_t) ) => {
196
- let _ = self . relate ( & a_t, & b_t) ?;
196
+ let _ = self . relate ( a_t, b_t) ?;
197
197
None
198
198
}
199
199
( & TyKind :: RawPtr ( a_mt) , & TyKind :: RawPtr ( b_mt) ) => {
200
- let _ = self . relate ( & a_mt, & b_mt) ?;
200
+ let _ = self . relate ( a_mt, b_mt) ?;
201
201
None
202
202
}
203
203
( & TyKind :: Ref ( a_r, a_ty, _) , & TyKind :: Ref ( b_r, b_ty, _) ) => {
204
- let _ = self . relate ( & a_r, & b_r) ?;
205
- let _ = self . relate ( & a_ty, & b_ty) ?;
204
+ let _ = self . relate ( a_r, b_r) ?;
205
+ let _ = self . relate ( a_ty, b_ty) ?;
206
206
None
207
207
}
208
208
( & TyKind :: FnDef ( a_def_id, a_substs) , & TyKind :: FnDef ( b_def_id, b_substs) ) => {
@@ -219,17 +219,17 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
219
219
Some ( ( a, b) )
220
220
}
221
221
( & TyKind :: FnPtr ( a_fty) , & TyKind :: FnPtr ( b_fty) ) => {
222
- let _ = self . relate ( & a_fty, & b_fty) ?;
222
+ let _ = self . relate ( a_fty, b_fty) ?;
223
223
None
224
224
}
225
225
( & TyKind :: Dynamic ( a_obj, a_r) , & TyKind :: Dynamic ( b_obj, b_r) ) => {
226
- let _ = self . relate ( & a_r, & b_r) ?;
226
+ let _ = self . relate ( a_r, b_r) ?;
227
227
let a = a_obj. principal ( ) ;
228
228
let b = b_obj. principal ( ) ;
229
229
230
230
if let ( Some ( a) , Some ( b) ) = ( a, b) {
231
231
if self . check_substs ( a. skip_binder ( ) . substs , b. skip_binder ( ) . substs ) {
232
- let _ = self . relate ( & a. skip_binder ( ) . substs , & b. skip_binder ( ) . substs ) ?;
232
+ let _ = self . relate ( a. skip_binder ( ) . substs , b. skip_binder ( ) . substs ) ?;
233
233
let a = Res :: Def ( DefKind :: Trait , a. skip_binder ( ) . def_id ) ;
234
234
let b = Res :: Def ( DefKind :: Trait , b. skip_binder ( ) . def_id ) ;
235
235
Some ( ( a, b) )
@@ -241,11 +241,11 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
241
241
}
242
242
}
243
243
( & TyKind :: Tuple ( as_) , & TyKind :: Tuple ( bs) ) => {
244
- let _ = as_. iter ( ) . zip ( bs) . map ( |( a, b) | self . relate ( & a, & b) ) ;
244
+ let _ = as_. iter ( ) . zip ( bs) . map ( |( a, b) | self . relate ( a, b) ) ;
245
245
None
246
246
}
247
247
( & TyKind :: Projection ( a_data) , & TyKind :: Projection ( b_data) ) => {
248
- let _ = self . relate ( & a_data, & b_data) ?;
248
+ let _ = self . relate ( a_data, b_data) ?;
249
249
250
250
let a = Res :: Def ( DefKind :: AssocTy , a_data. item_def_id ) ;
251
251
let b = Res :: Def ( DefKind :: AssocTy , b_data. item_def_id ) ;
@@ -305,8 +305,8 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
305
305
306
306
fn binders < T : Relate < ' tcx > > (
307
307
& mut self ,
308
- a : & ty:: Binder < T > ,
309
- b : & ty:: Binder < T > ,
308
+ a : ty:: Binder < T > ,
309
+ b : ty:: Binder < T > ,
310
310
) -> RelateResult < ' tcx , ty:: Binder < T > > {
311
311
Ok ( ty:: Binder :: bind (
312
312
self . relate ( a. skip_binder ( ) , b. skip_binder ( ) ) ?,
0 commit comments