]> git.lizzy.rs Git - rust.git/commitdiff
avoid printing the tag twice
authorRalf Jung <post@ralfj.de>
Fri, 24 May 2019 11:09:29 +0000 (13:09 +0200)
committerRalf Jung <post@ralfj.de>
Fri, 24 May 2019 11:09:29 +0000 (13:09 +0200)
src/stacked_borrows.rs

index 0c1e9b9c49aaf2c0aacea5216420e8c53ced8033..f997e6316435ab8becacdd3c963a0b0fe005dc3d 100644 (file)
@@ -497,7 +497,7 @@ fn memory_read<'tcx>(
         ptr: Pointer<Tag>,
         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<Tag>,
         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<Tag>,
         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)?;