Skip to content

Commit 34c58e8

Browse files
committed
Stacked Borrows: factor the logic determining the new permissions on retag into a separate function
1 parent 9397ea1 commit 34c58e8

File tree

3 files changed

+187
-167
lines changed

3 files changed

+187
-167
lines changed

src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {
459459
Operation::Dealloc(_) => format!(" due to deallocation"),
460460
Operation::Access(AccessOp { kind, tag, .. }) =>
461461
format!(" due to {kind:?} access for {tag:?}"),
462-
Operation::Retag(RetagOp { orig_tag, permission, .. }) => {
462+
Operation::Retag(RetagOp { orig_tag, permission, new_tag, .. }) => {
463463
let permission = permission
464464
.expect("start_grant should set the current permission before popping a tag");
465-
format!(" due to {permission:?} retag from {orig_tag:?}")
465+
format!(" due to {permission:?} retag from {orig_tag:?} (that retag created {new_tag:?})")
466466
}
467467
};
468468

0 commit comments

Comments
 (0)