Skip to content

Commit 17643af

Browse files
bjorn3RalfJung
andauthored
Apply suggestions from code review
Co-Authored-By: RalfJung <[email protected]>
1 parent 5998515 commit 17643af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stacked_borrows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ impl<'tcx> Stack {
400400
// Either way, we ensure that we insert the new item in a way that between
401401
// `derived_from` and the new one, there are only items *compatible with* `derived_from`.
402402
let new_idx = if weak {
403-
// A weak ShareadReadOnly reborrow might be added below other items, violating the
403+
// A weak SharedReadOnly reborrow might be added below other items, violating the
404404
// invariant that only SharedReadOnly can sit on top of SharedReadOnly.
405-
assert!(new.perm != Permission::SharedReadOnly, "Weak ShareadReadOnly reborrows don't work");
405+
assert!(new.perm != Permission::SharedReadOnly, "Weak SharedReadOnly reborrows don't work");
406406
// A very liberal reborrow because the new pointer does not expect any kind of aliasing guarantee.
407407
// Just insert new permission as child of old permission, and maintain everything else.
408408
// This inserts "as far down as possible", which is good because it makes this pointer as

0 commit comments

Comments
 (0)