Add CoerceShared field-wise reborrow WF checks#157489
Conversation
|
@rustbot label +F-Reborrow |
There was a problem hiding this comment.
Some issues but overall this looks pretty promising.
I'd kind of like the tests to all rather be added in the #157490 and then this PR to show which ones it fixes and which ones remain issues, but I'm not too partial on that point. I've reviewed the PR in the conventional comments style, so anything marked "thought" or "note" is just musings and not something you need to necessarily react to (unless you wish to), "question" is me being unsure but not something that would block the PR from merging, and "issues" and anything else marked "blocking" must be addressed before this can be considered for merging.
I'm also somewhat surprised that this PR didn't actually change any of the existing test results... I guess that's just a sign of our existing ui feature tests being insufficient :D
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
c82f18a to
8a5f5aa
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
I will be rebasing this Wednesday I think, and I will also update it so it shows what tests it fixes |
46b362c to
d5e890a
Compare
This comment has been minimized.
This comment has been minimized.
|
Ok, I had some time sooner than I expected I would. @aapoalas, I think I'm ready for another review. |
|
r? @oli-obk |
This comment has been minimized.
This comment has been minimized.
|
@P8L1 I realised that we should actually be also checking the ZST fields for "Copy or Reborrow" as well: while it doesn't matter for runtime correctness, it does matter for type system soundness. It's possible that a user might create a non-Copy ZST type and attempt to use that in a field of a Reborrow type, and we should catch that as an error and report. |
|
lol im playing around with it now, will do 😆 |
Localize the WF helper logic to builtin coherence and add the directly related UI coverage.
f9ec797 to
2cbef8c
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I made 96975b6 to address the ZST issues. I will now proceed to address the rest of Oli's review, then we can re-review |
View all comments
This PR attempts to add a well-formedness check for CoerceShared.
Split out of #157101
r? @aapoalas