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
|
@ -95,7 +95,7 @@ fn defaultness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> hir::Defaultness {
|
|||
fn adt_sized_constraint(tcx: TyCtxt<'_>, def_id: DefId) -> &[Ty<'_>] {
|
||||
if let Some(def_id) = def_id.as_local() {
|
||||
if matches!(tcx.representability(def_id), ty::Representability::Infinite) {
|
||||
return tcx.mk_type_list(&[tcx.ty_error_misc()]);
|
||||
return tcx.mk_type_list(&[Ty::new_misc_error(tcx)]);
|
||||
}
|
||||
}
|
||||
let def = tcx.adt_def(def_id);
|
||||
|
@ -285,7 +285,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
|
|||
let default_ty = if self.tcx.lower_impl_trait_in_trait_to_assoc_ty() {
|
||||
self.tcx.type_of(shifted_alias_ty.def_id).subst(self.tcx, shifted_alias_ty.substs)
|
||||
} else {
|
||||
self.tcx.mk_alias(ty::Opaque, shifted_alias_ty)
|
||||
Ty::new_alias(self.tcx,ty::Opaque, shifted_alias_ty)
|
||||
};
|
||||
|
||||
self.predicates.push(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue