about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-04-20 13:56:07 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-04-20 13:56:07 +0200
commit1caaafdce7871bc2816c9f42a14fd9262eda4037 (patch)
tree0af02e0d5522927c21c9d117d723b7d69f9054e3
parent1a4443995c91648460a5483ca8b7886cd04197e2 (diff)
downloadrust-1caaafdce7871bc2816c9f42a14fd9262eda4037.tar.gz
rust-1caaafdce7871bc2816c9f42a14fd9262eda4037.zip
Implement Copy for std::alloc::Layout
Fixes https://github.com/rust-lang/rust/issues/48458
-rw-r--r--src/libcore/alloc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index f08baa3dd71..54440eaa40f 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -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,