Closed lcnr closed 1 year ago
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
cc @rust-lang/types
@rustbot second
closing as accepted
Proposal
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
EarlyBinder
be the default can very easily result in incorrect uses of these queries, e.g. https://github.com/rust-lang/rust/blob/736c675d2ab65bcde6554e1b73340c2dbc27c85a/compiler/rustc_hir_analysis/src/astconv/mod.rs#L2720 which I found while reviewing https://github.com/rust-lang/rust/pull/101947. Thenormalize_ty
normalizestype_of(def_id)
in the wrong environment as we only callsubst
afterwards.Mentors or Reviewers
I am available to mentor and review this work.
Process
The main points of the Major Change Process are as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.