1
Fork 0

Pre-intern some commonly used type variables.

This requires some rearrangement of plumbing, such as adding
`mk_fresh_{,int_,float_}ty` and removing `mk_ty_infer`.
This commit is contained in:
Nicholas Nethercote 2023-02-08 11:52:19 +11:00
parent 5b8f284536
commit 6248bbbf26
6 changed files with 80 additions and 31 deletions

View file

@ -879,7 +879,7 @@ pub fn object_region_bounds<'tcx>(
// Since we don't actually *know* the self type for an object,
// this "open(err)" serves as a kind of dummy standin -- basically
// a placeholder type.
let open_ty = tcx.mk_ty_infer(ty::FreshTy(0));
let open_ty = tcx.mk_fresh_ty(0);
let predicates = existential_predicates.iter().filter_map(|predicate| {
if let ty::ExistentialPredicate::Projection(_) = predicate.skip_binder() {