-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemE-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
implement rust-lang/types-team#78
Change all queries which currently have a
bound_Xvariant to returnEarlyBinder<T>by default and remove thebound_Xversion. Add a methodfn EarlyBinder::<T>::subst_identity(self) -> Tif these queries are used in the identity context and don't need to actually substitute anything.Not having
EarlyBinderbe the default can very easily result in incorrect uses of these queries, e.g.which I found while reviewing #101947. The
EarlyBinder(self.normalize_ty(span, tcx.at(span).type_of(def_id))) normalize_tynormalizestype_of(def_id)in the wrong environment as we only callsubstafterwards.
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemE-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.