Skip to content

Commit

Permalink
Stacked Borrows: factor the logic determining the new permissions on …
Browse files Browse the repository at this point in the history
…retag into a separate function
  • Loading branch information
RalfJung committed Dec 6, 2022
1 parent 9397ea1 commit 34c58e8
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,10 @@ impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {
Operation::Dealloc(_) => format!(" due to deallocation"),
Operation::Access(AccessOp { kind, tag, .. }) =>
format!(" due to {kind:?} access for {tag:?}"),
Operation::Retag(RetagOp { orig_tag, permission, .. }) => {
Operation::Retag(RetagOp { orig_tag, permission, new_tag, .. }) => {
let permission = permission
.expect("start_grant should set the current permission before popping a tag");
format!(" due to {permission:?} retag from {orig_tag:?}")
format!(" due to {permission:?} retag from {orig_tag:?} (that retag created {new_tag:?})")
}
};

Expand Down
Loading

0 comments on commit 34c58e8

Please sign in to comment.