diff options
| -rw-r--r-- | src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs b/src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs index f65f49a75dd..774b36919fe 100644 --- a/src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs +++ b/src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs @@ -136,8 +136,16 @@ impl StackCache { impl PartialEq for Stack { fn eq(&self, other: &Self) -> bool { - // All the semantics of Stack are in self.borrows, everything else is caching - self.borrows == other.borrows + let Stack { + borrows, + unknown_bottom, + // The cache is ignored for comparison. + #[cfg(feature = "stack-cache")] + cache: _, + #[cfg(feature = "stack-cache")] + unique_range: _, + } = self; + *borrows == other.borrows && *unknown_bottom == other.unknown_bottom } } |
