1
Fork 0

Use mk_ty_from_kind a bit less, clean up lifetime handling in borrowck

This commit is contained in:
Michael Goulet 2025-02-28 01:27:04 +00:00
parent f45d4acf1b
commit 371c073ecf
4 changed files with 21 additions and 37 deletions

View file

@ -224,7 +224,7 @@ impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<D> for Ty<'tcx> {
})
} else {
let tcx = decoder.interner();
tcx.mk_ty_from_kind(rustc_type_ir::TyKind::decode(decoder))
tcx.mk_ty_from_kind(ty::TyKind::decode(decoder))
}
}
}

View file

@ -461,7 +461,7 @@ impl<'tcx> Ty<'tcx> {
#[inline]
pub fn new_param(tcx: TyCtxt<'tcx>, index: u32, name: Symbol) -> Ty<'tcx> {
tcx.mk_ty_from_kind(Param(ParamTy { index, name }))
Ty::new(tcx, Param(ParamTy { index, name }))
}
#[inline]