@@ -22,7 +22,6 @@ Changes from to the latest post (2.1) to the paper:
2222
2323Changes since publication of the paper:
2424
25- * HACK: Mutable references to ` !Unpin ` types do not make uniqueness assumptions.
2625* Items with ` SharedReadWrite ` permission are not protected even with ` FnEntry ` retagging.
2726
2827[ Miri ] : https://github.com/solson/miri/
@@ -289,9 +288,8 @@ fn reborrow(
289288We will grant `new_tag ` permission for all the locations covered by this place , by calling `grant ` for each location .
290289The parent tag (`derived_from `) is given by the place .
291290The interesting question is which permission to use for the new item :
292- - For non - two - phase `Unique ` to an `Unpin ` type , the permission is `Unique `.
293- (The `Unpin ` exception is a special hack to avoid soundness issues due to self - referential generators . )
294- - For mutable raw pointers and the remaining `Unique `, the permission is `SharedReadWrite `.
291+ - For non - two - phase `Unique `, the permission is `Unique `.
292+ - For mutable raw pointers and two - phase `Unique `, the permission is `SharedReadWrite `.
295293- For `Shared ` and immutable raw pointers , the permission is different for locations inside of and outside of `UnsafeCell `.
296294 Inside `UnsafeCell `, it is `SharedReadWrite `; outside it is `SharedReadOnly `.
297295 - The `UnsafeCell ` detection is entirely static : it recurses through structs ,
@@ -308,10 +306,10 @@ Otherwise the new item will not have a protector.
308306So , basically , for every location , we call `grant ` like this :
309307```rust
310308let (perm , protect ) = match ref_kind {
311- RefKind :: Unique { two_phase : false } if unpin =>
309+ RefKind :: Unique { two_phase : false } =>
312310 (Permission :: Unique , protect ),
313311 RefKind :: Raw { mutable : true } |
314- RefKind :: Unique { .. } =>
312+ RefKind :: Unique { two_phase : true } =>
315313 (Permission :: SharedReadWrite , protect ),
316314 RefKind :: Raw { mutable : false } |
317315 RefKind :: Shared =>
0 commit comments