@@ -241,7 +241,7 @@ impl<'tcx> Stack {
241
241
242
242
/// Find the first write-incompatible item above the given one --
243
243
/// i.e, find the height to which the stack will be truncated when writing to `granting`.
244
- fn find_first_write_incompaible ( & self , granting : usize ) -> usize {
244
+ fn find_first_write_incompatible ( & self , granting : usize ) -> usize {
245
245
let perm = self . borrows [ granting] . perm ;
246
246
match perm {
247
247
Permission :: SharedReadOnly =>
@@ -309,7 +309,7 @@ impl<'tcx> Stack {
309
309
if access == AccessKind :: Write {
310
310
// Remove everything above the write-compatible items, like a proper stack. This makes sure read-only and unique
311
311
// pointers become invalid on write accesses (ensures F2a, and ensures U2 for write accesses).
312
- let first_incompatible_idx = self . find_first_write_incompaible ( granting_idx) ;
312
+ let first_incompatible_idx = self . find_first_write_incompatible ( granting_idx) ;
313
313
for item in self . borrows . drain ( first_incompatible_idx..) . rev ( ) {
314
314
trace ! ( "access: popping item {:?}" , item) ;
315
315
Stack :: check_protector ( & item, Some ( tag) , global) ?;
@@ -391,7 +391,7 @@ impl<'tcx> Stack {
391
391
// access. Instead of popping the stack, we insert the item at the place the stack would
392
392
// be popped to (i.e., we insert it above all the write-compatible items).
393
393
// This ensures F2b by adding the new item below any potentially existing `SharedReadOnly`.
394
- self . find_first_write_incompaible ( granting_idx)
394
+ self . find_first_write_incompatible ( granting_idx)
395
395
} else {
396
396
// A "safe" reborrow for a pointer that actually expects some aliasing guarantees.
397
397
// Here, creating a reference actually counts as an access.
0 commit comments