Closed
Description
implement rust-lang/types-team#78
Change all queries which currently have a
bound_X
variant to returnEarlyBinder<T>
by default and remove thebound_X
version. Add a methodfn EarlyBinder::<T>::subst_identity(self) -> T
if these queries are used in the identity context and don't need to actually substitute anything.Not having
which I found while reviewing #101947. TheEarlyBinder
be the default can very easily result in incorrect uses of these queries, e.g.normalize_ty
normalizestype_of(def_id)
in the wrong environment as we only callsubst
afterwards.
Metadata
Metadata
Assignees
Labels
Area: Type systemCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.