-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor vtable format for upcoming trait_upcasting feature. #86461
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occured to rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
So it seems there's still something wrong with the |
This comment has been minimized.
This comment has been minimized.
To be clear, the 3 default components are still in the same place? If those move around, we'll have to adjust some CTFE and Miri tests. |
Also, so far nothing is using those new components yet, right? |
|
Okay, 👍 from the Miri/CTFE side then.
If this required codegen changes (which I assume it will), then Miri will also need updating. I'm happy to help with that. :) |
@RalfJung It will. Let's resume this discussion on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/object.20upcasting . |
Blocked on #86475 and after that this change will be smaller. |
☔ The latest upstream changes (presumably #86475) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
#86475 has landed and this is unblocked. |
…r` representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me but:
- can we include the examples from the documentation as tests?
- it'd be good to see a test with methods that cannot be called (because of irreconcilable where clauses)
@bors delegate+ |
✌️ @crlf0710 can now approve this pull request |
@bors r=nikomatsakis |
📌 Commit fbb353a has been approved by |
⌛ Testing commit fbb353a with merge 48e11d475136cc2161215b068c1f6b3182116276... |
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
This modifies vtable format:
VPtr
s for supertraits where this vtable cannot be directly reused during trait upcasting.Also, during codegen, the vtables corresponding to these newly included
VPtr
will be requested and generated.For the cases where this vtable can directly used, now the super trait vtable has exactly the same content to some prefix of this one.
r? @bjorn3
cc @RalfJung
cc @rust-lang/wg-traits