Skip to content

Commit cd00000

Browse files
committed
fix Unique
1 parent 11f6c9b commit cd00000

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wip/stacked-borrows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ let protector = if protect {
286286
None
287287
};
288288
let perm = match ref_kind {
289-
RefKind::Unique =>
289+
RefKind::Unique { two_phase: false } =>
290290
Permission::Unique,
291291
RefKind::Raw { mutable: true } |
292292
RefKind::Unique { two_phase: true } =>
@@ -311,7 +311,7 @@ For each reference (`&[mut] _`) and box (`Box<_>`) we encounter, and if `kind ==
311311
1. We compute a fresh tag: `Untagged` for raw pointers, `Tag(Tracking::new_ptr_id())` for everything else.
312312
2. We determine if we will want to protect the items we are going to generate:
313313
This is the case only if `kind == FnEntry` and the type of this pointer is a reference (not a box).
314-
3. We perform reborrowing of the memory this pointer points to with the new tag and indicating whether we want protection, treating boxes as `RefKind::Unique`.
314+
3. We perform reborrowing of the memory this pointer points to with the new tag and indicating whether we want protection, treating boxes as `RefKind::Unique { two_phase: false }`.
315315

316316
### Deallocating memory
317317

0 commit comments

Comments
 (0)