Implement Hash for core::alloc::Layout

This commit is contained in:
Deadbeef
2022-05-14 14:30:36 +10:00
parent f1f721e640
commit af9168c467
2 changed files with 9 additions and 2 deletions

View File

@@ -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.