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
|
@ -99,7 +99,7 @@ fn clif_pair_type_from_ty<'tcx>(
|
|||
|
||||
/// Is a pointer to this type a fat ptr?
|
||||
pub(crate) fn has_ptr_meta<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
|
||||
let ptr_ty = tcx.mk_ptr(TypeAndMut { ty, mutbl: rustc_hir::Mutability::Not });
|
||||
let ptr_ty = Ty::new_ptr(tcx, TypeAndMut { ty, mutbl: rustc_hir::Mutability::Not });
|
||||
match &tcx.layout_of(ParamEnv::reveal_all().and(ptr_ty)).unwrap().abi {
|
||||
Abi::Scalar(_) => false,
|
||||
Abi::ScalarPair(_, _) => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue