]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/interpret/error.rs
make LockInfo non-Copy
[rust.git] / src / librustc_mir / interpret / error.rs
index 0830db48d9f381fbfdc3aa5b263fa1ac80cc9e8f..ca740ff2d2c30f8cfb0b7886dabf45f33e761faf 100644 (file)
@@ -219,7 +219,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                        if access { "memory access" } else { "pointer computed" },
                        ptr.offset, ptr.alloc_id, allocation_size)
             },
-            MemoryLockViolation { ptr, len, access, lock } => {
+            MemoryLockViolation { ptr, len, access, ref lock } => {
                 write!(f, "{:?} access at {:?}, size {}, is in conflict with lock {:?}",
                        access, ptr, len, lock)
             }
@@ -227,7 +227,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                 write!(f, "tried to release memory write lock at {:?}, size {}, but the write lock is held by someone else",
                        ptr, len)
             }
-            DeallocatedLockedMemory { ptr, lock } => {
+            DeallocatedLockedMemory { ptr, ref lock } => {
                 write!(f, "tried to deallocate memory at {:?} in conflict with lock {:?}",
                        ptr, lock)
             }