-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement Mutation- and BorrowOfLayoutConstrainedField in thir-unsafeck #86665
Conversation
Thanks for your help on this! I'll assign this to you in the tracking issue, if you want to implement something else in the future feel free to just drop a comment on the tracking issue, just to make sure that there aren't two people working on the same thing. With that said, the last few unsafe ops to implement are the trickiest, so having multiple eyes on them is a good thing. I don't have time to do a proper review today, but I think I can already tell that this PR doesn't cover references that arise from patterns (e.g. Also cc @nikomatsakis, if you want to take a look at this as well |
Thanks for your quick response! I have added some code (and a test case) now that deals with by-reference bindings in |
The title of this PR confused me, but you probably didn't mean thir-borrowck :p |
Fixed, thanks for catching this! Thinking about all the different borrow kinds etc. apparently got me confused... |
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.
Okay, sorry for the wait, here's a first review. This is certainly trickier than it looks, and I worry that we'll miss edge cases, but it's OK if we miss things in this PR because THIR unsafeck is gated under an explicitely-marked-as-unsound-do-not-enable option.
cc @nikomatsakis you might be interested in reviewing if you have enough bandwidth |
c80ed9d
to
fbed40f
Compare
fbed40f
to
a4066a3
Compare
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.
Okay, besides my last comment I haven't found a case where the implementation is wrong. I'll still pass this to someone with better knowledge of the language than me. In the meantime here are a few nits.
a4066a3
to
c269774
Compare
All done, thanks again for your comments! |
r? @oli-obk |
☔ The latest upstream changes (presumably #85263) made this pull request unmergeable. Please resolve the merge conflicts. |
c269774
to
0994dd7
Compare
0994dd7
to
e244b17
Compare
e244b17
to
b088861
Compare
@bors r+ |
📌 Commit b088861 has been approved by |
☀️ Test successful - checks-actions |
Since nobody has so far claimed Mutation- and BorrowOfLayoutConstrainedField in rust-lang/project-thir-unsafeck#7, I have taken the liberty of implementing them in thir-unsafeck.
r? @LeSeulArtichaut