normalization rework: clean up projection_ty_core - #160608
Open
khyperia wants to merge 1 commit into
Open
Conversation
adwinwhite
reviewed
Aug 6, 2026
Comment on lines
+482
to
+484
| |ty, variant_index, field, ()| { | ||
| self.normalize(PlaceTy::field_ty(tcx, ty, variant_index, field), locations) | ||
| }, |
| T: ::std::fmt::Debug + Copy, | ||
| V: Debug, | ||
| T: Debug + Copy, | ||
| { |
Contributor
There was a problem hiding this comment.
I believe they should be normalized too. Is it a good idea that we add a debug assert to ensure the invariant holds? like debug_assert!(!tcx.next_trait_solver() || !self.ty.has_non_rigid_aliases()))
Though we seem to have no way of asserting this for the old solver.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in #160443 I was overly conservative in reworking how normalization works in projection_ty_core, because the PR was about other things. However, we can assume PlaceTy::ty is normalized (... I think).
r? lcnr