@@ -22,7 +22,6 @@ Changes from to the latest post (2.1) to the paper:
22
22
23
23
Changes since publication of the paper:
24
24
25
- * HACK: Mutable references to ` !Unpin ` types do not make uniqueness assumptions.
26
25
* Items with ` SharedReadWrite ` permission are not protected even with ` FnEntry ` retagging.
27
26
28
27
[ Miri ] : https://github.com./solson/miri/
@@ -289,9 +288,8 @@ fn reborrow(
289
288
We will grant `new_tag ` permission for all the locations covered by this place , by calling `grant ` for each location .
290
289
The parent tag (`derived_from `) is given by the place .
291
290
The 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 `.
295
293
- For `Shared ` and immutable raw pointers , the permission is different for locations inside of and outside of `UnsafeCell `.
296
294
Inside `UnsafeCell `, it is `SharedReadWrite `; outside it is `SharedReadOnly `.
297
295
- The `UnsafeCell ` detection is entirely static : it recurses through structs ,
@@ -308,10 +306,10 @@ Otherwise the new item will not have a protector.
308
306
So , basically , for every location , we call `grant ` like this :
309
307
```rust
310
308
let (perm , protect ) = match ref_kind {
311
- RefKind :: Unique { two_phase : false } if unpin =>
309
+ RefKind :: Unique { two_phase : false } =>
312
310
(Permission :: Unique , protect ),
313
311
RefKind :: Raw { mutable : true } |
314
- RefKind :: Unique { .. } =>
312
+ RefKind :: Unique { two_phase : true } =>
315
313
(Permission :: SharedReadWrite , protect ),
316
314
RefKind :: Raw { mutable : false } |
317
315
RefKind :: Shared =>
0 commit comments