introduce a fresh variant for "non-normalized" associated types #53683
Labels
A-trait-system
Area: Trait system
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-traits
Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
In the compiler today, we have one variant for associated type projections (e.g.,
T::Foo
):rust/src/librustc/ty/sty.rs
Lines 156 to 158 in 727eabd
We use context to know whether this is normalized or not -- basically, it should always be normalized, unless the type results from one of those queries that fetches the type that the user wrote for something like a field etc. In the lazy normalization approach that Chalk uses, however, we would want to be able to explicitly represent this difference.
The job here is to add a new variant. I think we should call it
TyUnnormalizedProjection
. This would be entirely unused for now -- but when we start to enable chalk, we will create this type when translating user types directly, and only createTyProjection
in the case that we have attempted to normalize the projection and failed.cc @tmandry @scalexm
The text was updated successfully, but these errors were encountered: