Repository navigation
Add a !type annotation to a vtable for every supertrait that is a prefix of the vtable - #165475
Open
folkertdev wants to merge 5 commits into
Open
folkertdev wants to merge 5 commits into
folkertdev wants to merge 5 commits into
Conversation
In `with_self_ty` the def_id that is used is just `self.def_id`, so this is always the same DefId
For now it gets at most one trait, the next step is to (recursively) provide supertraits too
folkertdev
force-pushed
the
vfe-upcast
branch
2 times, most recently
from
November 5, 2026 12:37
25055da to
7663f53
Compare
This comment has been minimized.
This comment has been minimized.
folkertdev
force-pushed
the
vfe-upcast
branch
from
November 5, 2026 14:07
7663f53 to
c36ddd6
Compare
This comment has been minimized.
This comment has been minimized.
folkertdev
force-pushed
the
vfe-upcast
branch
from
November 5, 2026 15:08
c36ddd6 to
3811141
Compare
folkertdev
force-pushed
the
vfe-upcast
branch
from
November 5, 2026 18:35
3811141 to
c638b49
Compare
folkertdev
commented
Nov 5, 2026
Contributor
Author
There was a problem hiding this comment.
On current nightly the drop does not run
Contributor
Author
|
r? WaffleLapkin |
Collaborator
|
|
folkertdev
marked this pull request as ready for review
November 5, 2026 23:34
Collaborator
|
Some changes occurred in compiler/rustc_codegen_llvm/src/debuginfo cc @Walnut356 |
Contributor
|
☔ The latest upstream changes (presumably #165844) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
This branch has not been deployed
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.
tracking issue: #68262
This fixes a miscompilation where a vtable was incorrectly eliminated because it was only used by a supertrait.
In https://godbolt.org/z/8TE1WMvac,
call_supercould be applied to bothAandB, but it incorrectly just always calls theBmethod. The vtable for A has been eliminated.The fix here only works for the first supertrait in the list, or later ones if they have no methods. So in
trait Foo: A + B, there is still a bug when B actually has methods (and its vtable is not a prefix ofFoos vtable).In that case the vtable for
Bdoes not get any!typeannotations, which provides incomplete information to VFE and it may therefore miscompile. That needs some further refactoring, which is blocked on #164808.Best reviewed commit-by-commit.