Implement Copy for std::alloc::Layout

Fixes https://github.com/rust-lang/rust/issues/48458
This commit is contained in:
Simon Sapin 2018-04-20 13:56:07 +02:00
parent 1a4443995c
commit 1caaafdce7

View file

@ -63,7 +63,7 @@ fn size_align<T>() -> (usize, usize) {
/// requests have positive size. A caller to the `Alloc::alloc`
/// method must either ensure that conditions like this are met, or
/// use specific allocators with looser requirements.)
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Layout {
// size of the requested block of memory, measured in bytes.
size: usize,