Conversation
RalfJung
left a comment
There was a problem hiding this comment.
Yeah, I tend to agree -- it is clear that a viable model for Unique requires a permission that completely degenerates when the protector is over, i.e., a very different kind of uniquenss than what we have for &mut. We have rust-lang/unsafe-code-guidelines#384 to track whether we want to do anything here in the future, and to record the outcome of this experiment.
There is an interesting discussion to be had whether we want this for all references -- this is tracked at rust-lang/unsafe-code-guidelines#450.
There was a problem hiding this comment.
This test doesn't make much sense any more in the form that you left it in, with all the comments stripped. I think the test can just be removed now (maybe double-check that we have an existing "pass" test equivalent to raw_children_of_refmut_can_alias).
There was a problem hiding this comment.
I removed the file and moved the test to the general tree_borrows.rs test file
There was a problem hiding this comment.
Isn't this an almost exact duplicate of two_raw?
There was a problem hiding this comment.
Oh, yes. But we could also make the test here stronger and also do reads directly to/from the reference, which two_raw does not do since it was originally taken from SB where this is not allowed.
There was a problem hiding this comment.
That's already pretty much covered by local_addr_of_mut.
There was a problem hiding this comment.
ok, then we can simply remove the test
|
This looks great, thanks! Please squash the commits, then we can land this. Please use the @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
85d8304 to
8cbe805
Compare
|
@rustbot ready PS: |
Thanks for testing it. :) I'll add it to my standard message then. |
…oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
…oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
…oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
Rollup merge of #144212 - bjorn3:remove_unique_lang_item, r=oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
Remove the ptr_unique lang item Miri no longer uses it since #4307.
Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
…oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
…oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
…oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
I propose we declare this experiment a failure and clean up the code a bit. I don't know who is using it, I fear no one is.