Move TyCtxt::mk_x to Ty::new_x where applicable
This commit is contained in:
parent
b5b1c0eddc
commit
40de0c2765
6 changed files with 9 additions and 8 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