Do not expect infer/bound/placeholder/error in v0 symbol mangling#130485
Merged
Conversation
compiler-errors
commented
Sep 17, 2024
| return Ok(()); | ||
| } | ||
|
|
||
| ty::Unevaluated(..) => bug!("symbol_names: unexpected unnormalized alias"), |
Contributor
Author
There was a problem hiding this comment.
should be normalized
|
|
||
| ty::Unevaluated(..) => bug!("symbol_names: unexpected unnormalized alias"), | ||
|
|
||
| ty::ConstKind::Expr(_) |
Contributor
Author
There was a problem hiding this comment.
should either be normalized (expr), unconstructable (infer/placeholder), unreachable (bound) or already dealt with (error).
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
omg in the wild |
f4d1fb5 to
87bc2f7
Compare
Contributor
Author
|
OK, I clarified when aliases are encountered in v0 symbol mangling. What a mess tbh lol |
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 20, 2024
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#130485 (Do not expect infer/bound/placeholder/error in v0 symbol mangling) - rust-lang#130567 (Register tool docs for compiletest) - rust-lang#130582 (rustdoc: use the correct span for doctests) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 20, 2024
Rollup merge of rust-lang#130485 - compiler-errors:impossible-types, r=BoxyUwU Do not expect infer/bound/placeholder/error in v0 symbol mangling Infer/bound/placeholder/error are not encounterable during codegen. Let's make sure v0 symbol mangling doesn't "accidentally" handle them. As for aliases (namely: projections and uv consts) these may still be encounterable because of the way that we render the def paths of items. Specifically, when we have something like: ``` struct W<T>(T); impl<T> W<T> { fn x() { fn y() {} } } ``` The path of `y` is rendered like `crate_name::W<T>::x::y`. Specifically, since `y` doesn't inherit the generics of the impl, we use the *identity* substitutions for that impl. If the impl has any aliases, they will remain unnormalized if they're rigid. r? `@BoxyUwU`
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.
Infer/bound/placeholder/error are not encounterable during codegen. Let's make sure v0 symbol mangling doesn't "accidentally" handle them.
As for aliases (namely: projections and uv consts) these may still be encounterable because of the way that we render the def paths of items. Specifically, when we have something like:
The path of
yis rendered likecrate_name::W<T>::x::y. Specifically, sinceydoesn't inherit the generics of the impl, we use the identity substitutions for that impl. If the impl has any aliases, they will remain unnormalized if they're rigid.r? @BoxyUwU