Move TyCtxt::mk_x
to Ty::new_x
where applicable
This commit is contained in:
parent
5dac6b320b
commit
12138b8e5e
164 changed files with 1386 additions and 1185 deletions
|
@ -423,7 +423,7 @@ where
|
|||
let unique_ty = adt.non_enum_variant().fields[FieldIdx::new(0)].ty(self.tcx(), substs);
|
||||
let unique_variant = unique_ty.ty_adt_def().unwrap().non_enum_variant();
|
||||
let nonnull_ty = unique_variant.fields[FieldIdx::from_u32(0)].ty(self.tcx(), substs);
|
||||
let ptr_ty = self.tcx().mk_imm_ptr(substs[0].expect_ty());
|
||||
let ptr_ty = Ty::new_imm_ptr(self.tcx(), substs[0].expect_ty());
|
||||
|
||||
let unique_place = self.tcx().mk_place_field(self.place, FieldIdx::new(0), unique_ty);
|
||||
let nonnull_place = self.tcx().mk_place_field(unique_place, FieldIdx::new(0), nonnull_ty);
|
||||
|
@ -628,10 +628,13 @@ where
|
|||
let drop_fn = tcx.associated_item_def_ids(drop_trait)[0];
|
||||
let ty = self.place_ty(self.place);
|
||||
|
||||
let ref_ty =
|
||||
tcx.mk_ref(tcx.lifetimes.re_erased, ty::TypeAndMut { ty, mutbl: hir::Mutability::Mut });
|
||||
let ref_ty = Ty::new_ref(
|
||||
tcx,
|
||||
tcx.lifetimes.re_erased,
|
||||
ty::TypeAndMut { ty, mutbl: hir::Mutability::Mut },
|
||||
);
|
||||
let ref_place = self.new_temp(ref_ty);
|
||||
let unit_temp = Place::from(self.new_temp(tcx.mk_unit()));
|
||||
let unit_temp = Place::from(self.new_temp(Ty::new_unit(tcx)));
|
||||
|
||||
let result = BasicBlockData {
|
||||
statements: vec![self.assign(
|
||||
|
@ -693,7 +696,7 @@ where
|
|||
let move_ = |place: Place<'tcx>| Operand::Move(place);
|
||||
let tcx = self.tcx();
|
||||
|
||||
let ptr_ty = tcx.mk_ptr(ty::TypeAndMut { ty: ety, mutbl: hir::Mutability::Mut });
|
||||
let ptr_ty = Ty::new_ptr(tcx, ty::TypeAndMut { ty: ety, mutbl: hir::Mutability::Mut });
|
||||
let ptr = Place::from(self.new_temp(ptr_ty));
|
||||
let can_go = Place::from(self.new_temp(tcx.types.bool));
|
||||
let one = self.constant_usize(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue