Skip to content

Commit 62efc62

Browse files
committed
Auto merge of rust-lang#2427 - Nilstrieb:doc-fix, r=saethlin
Fix outdated docs in sb stack cache Since `Item` is bitpacked now, the full `Item` is stored in the cache.
2 parents b2418e8 + 8b64380 commit 62efc62

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/stacked_borrows/stack.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ pub struct Stack {
3939
unique_range: Range<usize>,
4040
}
4141

42-
/// A very small cache of searches of the borrow stack
43-
/// This maps items to locations in the borrow stack. Any use of this still needs to do a
44-
/// probably-cold random access into the borrow stack to figure out what `Permission` an
45-
/// `SbTag` grants. We could avoid this by also storing the `Permission` in the cache, but
46-
/// most lookups into the cache are immediately followed by access of the full borrow stack anyway.
42+
/// A very small cache of searches of a borrow stack, mapping `Item`s to their position in said stack.
4743
///
4844
/// It may seem like maintaining this cache is a waste for small stacks, but
4945
/// (a) iterating over small fixed-size arrays is super fast, and (b) empirically this helps *a lot*,

0 commit comments

Comments
 (0)