diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-03-30 16:48:03 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-03-30 21:14:43 +1100 |
| commit | 44bfb6538e553a8da386270c7399076b3a2f725d (patch) | |
| tree | 6d204dcbc1cd6698dac99b62b0dd03f7ac976e62 | |
| parent | 0ccb60096ac8d166c740ff1180ba33b5f7421c8f (diff) | |
| download | rust-44bfb6538e553a8da386270c7399076b3a2f725d.tar.gz rust-44bfb6538e553a8da386270c7399076b3a2f725d.zip | |
`CacheAligned` and `Sharded` don't need to derive `Clone`.
| -rw-r--r-- | compiler/rustc_data_structures/src/sharded.rs | 3 |
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], } |
