Uh oh!
There was an error while loading. Please reload this page.
Trait upcasting coercion (part2) - #87515
Conversation
rust-highfive
commented
Jul 27, 2021
Some changes occured to rustc_codegen_cranelift cc @bjorn3 Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
522611b to
cf6db18CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Jul 27, 2021
☔ The latest upstream changes (presumably #83484) made this pull request unmergeable. Please resolve the merge conflicts. |
crlf0710
commented
Jul 31, 2021
#86264 has landed, now this is unblocked. I'll address the review comments very soon, and add more tests. |
cf6db18 to
aaba84eComparecrlf0710
commented
Jul 31, 2021
Rebased, addressed the review comments and pull in some tests and document from previous work. This is ready for review again now. |
There was a problem hiding this comment.
Isn't the principal non-existent when the trait object only consists of traits like Send, Sync or Sized?
There was a problem hiding this comment.
Yes, if the principal is non-existent, either it's not upcasting coercion, like &dyn Send+Sync to &dyn Send will be a simple case (and will take the early return code path), or it will be rejected by type-checking, like dyn Foo + Send to dyn Send will be rejected.
I added some comments within the code to clarify.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aaba84e to
4e22b21Comparecrlf0710
commented
Aug 1, 2021
Thanks for the comments! Updated. |
Uh oh!
There was an error while loading. Please reload this page.
bjorn3
left a comment
There was a problem hiding this comment.
The codegen part LGTM apart from a minor nit. I will leave @RalfJung to approve the miri part. I don't see any obvious problems with the trait selection code, but given that I am not familiar with it, maybe @nikomatsakis want to take a look?
2e69d6c to
f99a37eComparecrlf0710
commented
Aug 2, 2021
Updated and addressed the comments. For the trait selection related stuff, I think niko has been and will be on vacation in the next two weeks. if it's possible i'd prefer more detailed review of this part be defered a little, and we'll revisit it after this FIXME is solved. |
RalfJung
commented
Aug 2, 2021
👍 for the Miri engine changes. |
bjorn3
left a comment
There was a problem hiding this comment.
For the trait selection related stuff, I think niko has been and will be on vacation in the next two weeks. if it's possible i'd prefer more detailed review of this part be defered a little, and we'll revisit it after this FIXME is solved.
Sure. r=me with the nit resolved.
Uh oh!
There was an error while loading. Please reload this page.
f99a37e to
3cb625eComparecrlf0710
commented
Aug 2, 2021
@bjorn3 Updated with the comment above addressed! |
bjorn3
commented
Aug 2, 2021
@bors r+ |
bors
commented
Aug 2, 2021
📌 Commit 3cb625e has been approved by |
bors
commented
Aug 3, 2021
bors
commented
Aug 3, 2021
☀️ Test successful - checks-actions |
Trait upcasting coercion (part2) This is the second part of trait upcasting coercion implementation. Currently this is blocked on rust-lang#86264 . The third part might be implemented using unsafety checking r? `@bjorn3`
…jorn3 Sync rustc_codegen_cranelift 05677b6 removes two assertions that should have been removed in rust-lang#87515. They are no longer correct and trigger while compiling the sysroot. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
Sync rustc_codegen_cranelift 05677b6 removes two assertions that should have been removed in rust-lang/rust#87515. They are no longer correct and trigger while compiling the sysroot. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
Sync rustc_codegen_cranelift 05677b6 removes two assertions that should have been removed in rust-lang/rust#87515. They are no longer correct and trigger while compiling the sysroot. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
This is the second part of trait upcasting coercion implementation.
Currently this is blocked on #86264 .
The third part might be implemented using unsafety checking
r? @bjorn3