add a sanity assertion

This commit is contained in:
Ralf Jung 2018-11-16 08:40:00 +01:00
parent cf1746222e
commit 60e26af323

View File

@ -318,6 +318,7 @@ impl<'tcx> Stacks {
new_bor: Borrow,
new_kind: RefKind,
) -> EvalResult<'tcx> {
assert_eq!(new_bor.is_unique(), new_kind == RefKind::Unique);
trace!("reborrow for tag {:?} to {:?} as {:?}: {:?}, size {}",
ptr.tag, new_bor, new_kind, ptr, size.bytes());
let mut stacks = self.stacks.borrow_mut();