@@ -273,7 +273,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
273
273
deref. region ,
274
274
ty:: TypeAndMut { ty : target, mutbl : deref. mutbl } ,
275
275
) ;
276
- self . cat_rvalue ( expr. hir_id , expr . span , ref_ty)
276
+ self . cat_rvalue ( expr. hir_id , ref_ty)
277
277
} else {
278
278
previous ( ) ?
279
279
} ;
@@ -285,7 +285,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
285
285
| adjustment:: Adjust :: Borrow ( _)
286
286
| adjustment:: Adjust :: DynStar => {
287
287
// Result is an rvalue.
288
- Ok ( self . cat_rvalue ( expr. hir_id , expr . span , target) )
288
+ Ok ( self . cat_rvalue ( expr. hir_id , target) )
289
289
}
290
290
}
291
291
}
@@ -374,7 +374,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
374
374
| hir:: ExprKind :: Repeat ( ..)
375
375
| hir:: ExprKind :: InlineAsm ( ..)
376
376
| hir:: ExprKind :: OffsetOf ( ..)
377
- | hir:: ExprKind :: Err ( _) => Ok ( self . cat_rvalue ( expr. hir_id , expr . span , expr_ty) ) ,
377
+ | hir:: ExprKind :: Err ( _) => Ok ( self . cat_rvalue ( expr. hir_id , expr_ty) ) ,
378
378
}
379
379
}
380
380
@@ -396,7 +396,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
396
396
| DefKind :: AssocFn ,
397
397
_,
398
398
)
399
- | Res :: SelfCtor ( ..) => Ok ( self . cat_rvalue ( hir_id, span , expr_ty) ) ,
399
+ | Res :: SelfCtor ( ..) => Ok ( self . cat_rvalue ( hir_id, expr_ty) ) ,
400
400
401
401
Res :: Def ( DefKind :: Static ( _) , _) => {
402
402
Ok ( PlaceWithHirId :: new ( hir_id, expr_ty, PlaceBase :: StaticItem , Vec :: new ( ) ) )
@@ -433,13 +433,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
433
433
}
434
434
435
435
#[ instrument( level = "debug" , skip( self ) , ret) ]
436
- pub ( crate ) fn cat_rvalue (
437
- & self ,
438
- hir_id : hir:: HirId ,
439
- // FIXME: remove
440
- _span : Span ,
441
- expr_ty : Ty < ' tcx > ,
442
- ) -> PlaceWithHirId < ' tcx > {
436
+ pub ( crate ) fn cat_rvalue ( & self , hir_id : hir:: HirId , expr_ty : Ty < ' tcx > ) -> PlaceWithHirId < ' tcx > {
443
437
PlaceWithHirId :: new ( hir_id, expr_ty, PlaceBase :: Rvalue , Vec :: new ( ) )
444
438
}
445
439
@@ -487,7 +481,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
487
481
} ;
488
482
let ref_ty = Ty :: new_ref ( self . tcx ( ) , region, ty:: TypeAndMut { ty : place_ty, mutbl } ) ;
489
483
490
- let base = self . cat_rvalue ( expr. hir_id , expr . span , ref_ty) ;
484
+ let base = self . cat_rvalue ( expr. hir_id , ref_ty) ;
491
485
self . cat_deref ( expr, base)
492
486
}
493
487
0 commit comments