Use mk_ty_from_kind a bit less, clean up lifetime handling in borrowck
This commit is contained in:
parent
f45d4acf1b
commit
371c073ecf
4 changed files with 21 additions and 37 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue