about summary refs log tree commit diff
path: root/library/core/src/alloc
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2022-05-14 14:30:36 +1000
committerDeadbeef <ent3rm4n@gmail.com>2022-05-14 14:44:42 +1000
commitaf9168c467e04c1f67ff88d48735f5f4a6dc5c8c (patch)
treeeb9b76985b40cd856db8c44c6aaad4cfcdb1d9ca /library/core/src/alloc
parentf1f721e64014863f41c1a386b04af04c2de25321 (diff)
downloadrust-af9168c467e04c1f67ff88d48735f5f4a6dc5c8c.tar.gz
rust-af9168c467e04c1f67ff88d48735f5f4a6dc5c8c.zip
Implement `Hash` for `core::alloc::Layout`
Diffstat (limited to 'library/core/src/alloc')
-rw-r--r--library/core/src/alloc/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index cf864039a23..2f378836cbb 100644
--- a/library/core/src/alloc/layout.rs
+++ b/library/core/src/alloc/layout.rs
@@ -26,7 +26,7 @@ const fn size_align<T>() -> (usize, usize) {
 /// like this are met, use specific allocators with looser
 /// requirements, or use the more lenient `Allocator` interface.)
 #[stable(feature = "alloc_layout", since = "1.28.0")]
-#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
 #[lang = "alloc_layout"]
 pub struct Layout {
     // size of the requested block of memory, measured in bytes.