]> git.lizzy.rs Git - rust.git/commitdiff
Implement Copy for std::alloc::Layout
authorSimon Sapin <simon.sapin@exyr.org>
Fri, 20 Apr 2018 11:56:07 +0000 (13:56 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Fri, 20 Apr 2018 11:56:07 +0000 (13:56 +0200)
Fixes https://github.com/rust-lang/rust/issues/48458

src/libcore/alloc.rs

index f08baa3dd71c3146ec312b325b66eff00761f6df..54440eaa40f911b1f5655044b51442901f4cea41 100644 (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,