about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-03-30 16:48:03 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-03-30 21:14:43 +1100
commit44bfb6538e553a8da386270c7399076b3a2f725d (patch)
tree6d204dcbc1cd6698dac99b62b0dd03f7ac976e62
parent0ccb60096ac8d166c740ff1180ba33b5f7421c8f (diff)
downloadrust-44bfb6538e553a8da386270c7399076b3a2f725d.tar.gz
rust-44bfb6538e553a8da386270c7399076b3a2f725d.zip
`CacheAligned` and `Sharded` don't need to derive `Clone`.
-rw-r--r--compiler/rustc_data_structures/src/sharded.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/sharded.rs b/compiler/rustc_data_structures/src/sharded.rs
index 01d292dde8d..f88c055a9b5 100644
--- a/compiler/rustc_data_structures/src/sharded.rs
+++ b/compiler/rustc_data_structures/src/sharded.rs
@@ -5,7 +5,7 @@ use std::collections::hash_map::RawEntryMut;
 use std::hash::{Hash, Hasher};
 use std::mem;
 
-#[derive(Clone, Default)]
+#[derive(Default)]
 #[cfg_attr(parallel_compiler, repr(align(64)))]
 struct CacheAligned<T>(T);
 
@@ -21,7 +21,6 @@ const SHARD_BITS: usize = 0;
 pub const SHARDS: usize = 1 << SHARD_BITS;
 
 /// An array of cache-line aligned inner locked structures with convenience methods.
-#[derive(Clone)]
 pub struct Sharded<T> {
     shards: [CacheAligned<Lock<T>>; SHARDS],
 }