Closed compiler-errors 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
we still have to manually close those :grin:
Combine
ty::Opaque
andty::Projection
intoty::Alias
Aims to combine
ty::Opaque
andty::Projection
intoty::Alias
. Both are just a def-id and set of substitutions. We should also be able to easily add new alias variants in the future if needed.The new
TyKind
API will somewhat look like:To make sure that code can still match on the old usages
ty::Opaque
andty::Projection
, we distinguish the variants withAliasKind
. This is important in places where we don't have access toTyCtxt
, such as flags computation. Also, it would be somewhat expensive to add new def-id comparisons.This means most match sites can go from
ty::Projection(proj)
toty::Alias(ty::Projection, proj)
, meaning the refactor will be mostly mechanical.The API is somewhat different from the way that Chalk does it, where
AliasTy
is an enum with a data-fulProjection
andOpaque
variant: https://docs.rs/chalk-ir/0.87.0/chalk_ir/enum.AliasTy.htmlMentors or Reviewers
@compiler-errors's implementation: https://github.com/rust-lang/rust/compare/master...compiler-errors:rust:opaques still needs some cleaning, but only took like an hour or so.. also we might want to tweak the API a bit...
The change is mostly mechanical, so anyone on the team can review.
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.