Commit 64e84a452b

Krzysztof Wolicki <der.teufel.mail@gmail.com>
2024-07-07 12:13:07
std.ArrayHashMap: unmanaged holds the pointer stability lock
1 parent ae91991
Changed files (1)
lib/std/array_hash_map.zig
@@ -427,7 +427,7 @@ pub fn ArrayHashMap(
         /// Set the map to an empty state, making deinitialization a no-op, and
         /// returning a copy of the original.
         pub fn move(self: *Self) Self {
-            self.pointer_stability.assertUnlocked();
+            self.unmanaged.pointer_stability.assertUnlocked();
             const result = self.*;
             self.unmanaged = .{};
             return result;