From: Ralf Jung Date: Fri, 24 May 2019 11:09:29 +0000 (+0200) Subject: avoid printing the tag twice X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=21fb14dba1649ef8f2be612df2943fc9313781be;p=rust.git avoid printing the tag twice --- diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index 0c1e9b9c49a..f997e631643 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -497,7 +497,7 @@ fn memory_read<'tcx>( ptr: Pointer, size: Size, ) -> EvalResult<'tcx> { - trace!("read access with tag {:?}: {:?}, size {}", ptr.tag, ptr, size.bytes()); + trace!("read access with tag {:?}: {:?}, size {}", ptr.tag, ptr.erase_tag(), size.bytes()); alloc.extra.for_each(ptr, size, |stack, global| { stack.access(AccessKind::Read, ptr.tag, global)?; Ok(()) @@ -510,7 +510,7 @@ fn memory_written<'tcx>( ptr: Pointer, size: Size, ) -> EvalResult<'tcx> { - trace!("write access with tag {:?}: {:?}, size {}", ptr.tag, ptr, size.bytes()); + trace!("write access with tag {:?}: {:?}, size {}", ptr.tag, ptr.erase_tag(), size.bytes()); alloc.extra.for_each(ptr, size, |stack, global| { stack.access(AccessKind::Write, ptr.tag, global)?; Ok(()) @@ -523,7 +523,7 @@ fn memory_deallocated<'tcx>( ptr: Pointer, size: Size, ) -> EvalResult<'tcx> { - trace!("deallocation with tag {:?}: {:?}, size {}", ptr.tag, ptr, size.bytes()); + trace!("deallocation with tag {:?}: {:?}, size {}", ptr.tag, ptr.erase_tag(), size.bytes()); alloc.extra.for_each(ptr, size, |stack, global| { stack.dealloc(ptr.tag, global) }) @@ -546,7 +546,7 @@ fn reborrow( let protector = if protect { Some(this.frame().extra) } else { None }; let ptr = place.ptr.to_ptr()?; trace!("reborrow: {} reference {:?} derived from {:?} (pointee {}): {:?}, size {}", - kind, new_tag, ptr.tag, place.layout.ty, ptr, size.bytes()); + kind, new_tag, ptr.tag, place.layout.ty, ptr.erase_tag(), size.bytes()); // Get the allocation. It might not be mutable, so we cannot use `get_mut`. let alloc = this.memory().get(ptr.alloc_id)?;