@@ -1413,9 +1413,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1413
1413
_ => ConstraintCategory :: Assignment ,
1414
1414
} ;
1415
1415
1416
- let place_ty = place. ty ( & * body, tcx) . ty ;
1416
+ let place_ty = place. ty ( * body, tcx) . ty ;
1417
1417
let place_ty = self . normalize ( place_ty, location) ;
1418
- let rv_ty = rv. ty ( & * body, tcx) ;
1418
+ let rv_ty = rv. ty ( * body, tcx) ;
1419
1419
let rv_ty = self . normalize ( rv_ty, location) ;
1420
1420
if let Err ( terr) =
1421
1421
self . sub_types_or_anon ( rv_ty, place_ty, location. to_locations ( ) , category)
@@ -1467,7 +1467,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1467
1467
ref place,
1468
1468
variant_index,
1469
1469
} => {
1470
- let place_type = place. ty ( & * body, tcx) . ty ;
1470
+ let place_type = place. ty ( * body, tcx) . ty ;
1471
1471
let adt = match place_type. kind {
1472
1472
ty:: Adt ( adt, _) if adt. is_enum ( ) => adt,
1473
1473
_ => {
@@ -1489,7 +1489,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1489
1489
} ;
1490
1490
}
1491
1491
StatementKind :: AscribeUserType ( box( ref place, ref projection) , variance) => {
1492
- let place_ty = place. ty ( & * body, tcx) . ty ;
1492
+ let place_ty = place. ty ( * body, tcx) . ty ;
1493
1493
if let Err ( terr) = self . relate_type_and_user_type (
1494
1494
place_ty,
1495
1495
variance,
@@ -2010,7 +2010,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2010
2010
// While this is located in `nll::typeck` this error is not an NLL error, it's
2011
2011
// a required check to make sure that repeated elements implement `Copy`.
2012
2012
let span = body. source_info ( location) . span ;
2013
- let ty = operand. ty ( & * body, tcx) ;
2013
+ let ty = operand. ty ( * body, tcx) ;
2014
2014
if !self . infcx . type_is_copy_modulo_regions ( self . param_env , ty, span) {
2015
2015
// To determine if `const_in_array_repeat_expressions` feature gate should
2016
2016
// be mentioned, need to check if the rvalue is promotable.
@@ -2064,7 +2064,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2064
2064
Rvalue :: Cast ( cast_kind, op, ty) => {
2065
2065
match cast_kind {
2066
2066
CastKind :: Pointer ( PointerCast :: ReifyFnPointer ) => {
2067
- let fn_sig = op. ty ( & * body, tcx) . fn_sig ( tcx) ;
2067
+ let fn_sig = op. ty ( * body, tcx) . fn_sig ( tcx) ;
2068
2068
2069
2069
// The type that we see in the fcx is like
2070
2070
// `foo::<'a, 'b>`, where `foo` is the path to a
@@ -2093,7 +2093,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2093
2093
}
2094
2094
2095
2095
CastKind :: Pointer ( PointerCast :: ClosureFnPointer ( unsafety) ) => {
2096
- let sig = match op. ty ( & * body, tcx) . kind {
2096
+ let sig = match op. ty ( * body, tcx) . kind {
2097
2097
ty:: Closure ( def_id, substs) => {
2098
2098
substs. as_closure ( ) . sig_ty ( def_id, tcx) . fn_sig ( tcx)
2099
2099
}
@@ -2119,7 +2119,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2119
2119
}
2120
2120
2121
2121
CastKind :: Pointer ( PointerCast :: UnsafeFnPointer ) => {
2122
- let fn_sig = op. ty ( & * body, tcx) . fn_sig ( tcx) ;
2122
+ let fn_sig = op. ty ( * body, tcx) . fn_sig ( tcx) ;
2123
2123
2124
2124
// The type that we see in the fcx is like
2125
2125
// `foo::<'a, 'b>`, where `foo` is the path to a
@@ -2151,7 +2151,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2151
2151
let & ty = ty;
2152
2152
let trait_ref = ty:: TraitRef {
2153
2153
def_id : tcx. lang_items ( ) . coerce_unsized_trait ( ) . unwrap ( ) ,
2154
- substs : tcx. mk_substs_trait ( op. ty ( & * body, tcx) , & [ ty. into ( ) ] ) ,
2154
+ substs : tcx. mk_substs_trait ( op. ty ( * body, tcx) , & [ ty. into ( ) ] ) ,
2155
2155
} ;
2156
2156
2157
2157
self . prove_trait_ref (
@@ -2162,7 +2162,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2162
2162
}
2163
2163
2164
2164
CastKind :: Pointer ( PointerCast :: MutToConstPointer ) => {
2165
- let ty_from = match op. ty ( & * body, tcx) . kind {
2165
+ let ty_from = match op. ty ( * body, tcx) . kind {
2166
2166
ty:: RawPtr ( ty:: TypeAndMut {
2167
2167
ty : ty_from,
2168
2168
mutbl : hir:: Mutability :: Mutable ,
@@ -2210,7 +2210,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2210
2210
}
2211
2211
2212
2212
CastKind :: Pointer ( PointerCast :: ArrayToPointer ) => {
2213
- let ty_from = op. ty ( & * body, tcx) ;
2213
+ let ty_from = op. ty ( * body, tcx) ;
2214
2214
2215
2215
let opt_ty_elem = match ty_from. kind {
2216
2216
ty:: RawPtr (
@@ -2272,7 +2272,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2272
2272
}
2273
2273
2274
2274
CastKind :: Misc => {
2275
- let ty_from = op. ty ( & * body, tcx) ;
2275
+ let ty_from = op. ty ( * body, tcx) ;
2276
2276
let cast_ty_from = CastTy :: from_ty ( ty_from) ;
2277
2277
let cast_ty_to = CastTy :: from_ty ( ty) ;
2278
2278
match ( cast_ty_from, cast_ty_to) {
@@ -2339,9 +2339,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2339
2339
| Rvalue :: BinaryOp ( BinOp :: Le , left, right)
2340
2340
| Rvalue :: BinaryOp ( BinOp :: Gt , left, right)
2341
2341
| Rvalue :: BinaryOp ( BinOp :: Ge , left, right) => {
2342
- let ty_left = left. ty ( & * body, tcx) ;
2342
+ let ty_left = left. ty ( * body, tcx) ;
2343
2343
if let ty:: RawPtr ( _) | ty:: FnPtr ( _) = ty_left. kind {
2344
- let ty_right = right. ty ( & * body, tcx) ;
2344
+ let ty_right = right. ty ( * body, tcx) ;
2345
2345
let common_ty = self . infcx . next_ty_var (
2346
2346
TypeVariableOrigin {
2347
2347
kind : TypeVariableOriginKind :: MiscVariable ,
0 commit comments