From: Ralf Jung Date: Tue, 8 Oct 2024 13:02:14 +0000 (+0200) Subject: fix an old typo and remove a reduntant clause X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/b1fb7e6b7275d6c6341ecec5aa372f246e863f97?ds=sidebyside fix an old typo and remove a reduntant clause --- diff --git a/personal/_posts/2018-11-16-stacked-borrows-implementation.md b/personal/_posts/2018-11-16-stacked-borrows-implementation.md index dbea705..64f9e31 100644 --- a/personal/_posts/2018-11-16-stacked-borrows-implementation.md +++ b/personal/_posts/2018-11-16-stacked-borrows-implementation.md @@ -497,7 +497,7 @@ refine these instructions later) on all locations covered by the reference 3. Perform the actions that would also happen when an actual access happens through this reference (for shared references a read access, for mutable references a write access). -4. Check if the new tag is `Shr(Some(t))` and the location is inside an `UnsafeCell`. +4. Check if the new tag is `Shr(Some(t))` and the location is *not* inside an `UnsafeCell`. - If both conditions apply, freeze the location with timestamp `t`. If it is already frozen, do nothing. - Otherwise, push a new item onto the stack: `Shr` if the tag is a `Shr(_)`, @@ -669,9 +669,8 @@ executed on all locations covered by the reference, according to `size_of_val`): Now the location cannot be frozen any more: If the fresh tag is `Uniq`, we just unfroze; if the fresh tag is `Shr` and the location was already frozen, then the redundancy check (step 3) would have kicked in. -5. Check if the new tag is `Shr(Some(t))` and the location is inside an `UnsafeCell`. - - If both conditions apply, freeze the location with timestamp `t`. If it - is already frozen, do nothing. +5. Check if the new tag is `Shr(Some(t))` and the location is *not* inside an `UnsafeCell`. + - If both conditions apply, freeze the location with timestamp `t`. - Otherwise, push a new item onto the stack: `Shr` if the tag is a `Shr(_)`, `Uniq(id)` if the tag is `Uniq(id)`.