Refactor vtable format for upcoming trait_upcasting feature.#86461
Refactor vtable format for upcoming trait_upcasting feature.#86461bors merged 4 commits intorust-lang:masterfrom
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.
nikomatsakis
left a comment
There was a problem hiding this comment.
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:
VPtrs for supertraits where this vtable cannot be directly reused during trait upcasting.Also, during codegen, the vtables corresponding to these newly included
VPtrwill 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