1
Fork 0

PlaceRef::ty: use method call syntax

This commit is contained in:
Ralf Jung 2021-01-16 11:34:22 +01:00
parent 4e208f6a3a
commit 1b09dc2596
5 changed files with 10 additions and 8 deletions

View file

@ -119,7 +119,7 @@ impl<Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> {
)
);
if is_consume {
let base_ty = mir::PlaceRef::ty(&place_base, self.fx.mir, cx.tcx());
let base_ty = place_base.ty(self.fx.mir, cx.tcx());
let base_ty = self.fx.monomorphize(base_ty);
// ZSTs don't require any actual memory access.

View file

@ -506,7 +506,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
pub fn monomorphized_place_ty(&self, place_ref: mir::PlaceRef<'tcx>) -> Ty<'tcx> {
let tcx = self.cx.tcx();
let place_ty = mir::PlaceRef::ty(&place_ref, self.mir, tcx);
let place_ty = place_ref.ty(self.mir, tcx);
self.monomorphize(place_ty.ty)
}
}