Normalize instance substs during legacy symbol mangling#100312
Closed
compiler-errors wants to merge 1 commit intorust-lang:masterfrom
Closed
Normalize instance substs during legacy symbol mangling#100312compiler-errors wants to merge 1 commit intorust-lang:masterfrom
compiler-errors wants to merge 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
Ugh, debug assertions. @rustbot author |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
Author
|
Actually, this is the wrong approach I think. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 11, 2022
Keep going if normalized projection has unevaluated consts in `QueryNormalizer` rust-lang#100312 was the wrong approach, I think this is the right one. When normalizing a type, if we see that it's a projection, we currently defer to `tcx.normalize_projection_ty`, which normalizes the projections away but doesn't touch the unevaluated constants. So now we just continue to fold the type if it has unevaluated constants so we make sure to evaluate those too, if we can. Fixes rust-lang#100217 Fixes rust-lang#83972 Fixes rust-lang#84669 Fixes rust-lang#86710 Fixes rust-lang#82268 Fixes rust-lang#73298
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.
We already normalize in the v0 mangling scheme, and this shouldn't have an effect on non-
generic_const_exprcode, since normalization should be idempotent in any other case, though I can gate it behind that feature if desired if there's perceived risk.Open to alternative approaches, such as tracking down where these unnormalized const substs are actually coming from.
Fixes #100217
Fixes #83972
Fixes #84669
Fixes #86710
Fixes #82268
Fixes #73298