From: Ralf Jung Date: Tue, 30 Apr 2019 21:25:23 +0000 (+0200) Subject: mention that granting used to be matching X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/044dc60bc27ab356b5d9f2451d58645fb83e0b0e?ds=inline;hp=a96d7d41f031bf3bf3b0101eadb1a429b9463f39 mention that granting used to be matching --- diff --git a/ralf/_posts/2019-04-30-stacked-borrows-2.md b/ralf/_posts/2019-04-30-stacked-borrows-2.md index 7951899..8436bff 100644 --- a/ralf/_posts/2019-04-30-stacked-borrows-2.md +++ b/ralf/_posts/2019-04-30-stacked-borrows-2.md @@ -88,6 +88,7 @@ For each affected location, we go through two steps: first we try to find the *g **Finding the granting item.** To find the granting item, we traverse the borrow stack top-to-bottom and search for an item that has the same tag. If this is a write access, we go on looking until we find an item with the right tag whose permission is `SharedReadWrite` or `Unique`---we do not consider items with `SharedReadOnly` permission to grant a write access. +This is the item that grants pointers tagged `tag` the permission to perform the given access, hence the name (the same concept used to be called "matching item" in Stacked Borrows 1). Once we found the granting item, we remember its position in the stack; that will be important for the second step. If no granting item can be found, the access causes undefined behavior.