Skip to content

Commit 44bfb65

Browse files
committed
CacheAligned and Sharded don't need to derive Clone.
1 parent 0ccb600 commit 44bfb65

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_data_structures/src/sharded.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::collections::hash_map::RawEntryMut;
55
use std::hash::{Hash, Hasher};
66
use std::mem;
77

8-
#[derive(Clone, Default)]
8+
#[derive(Default)]
99
#[cfg_attr(parallel_compiler, repr(align(64)))]
1010
struct CacheAligned<T>(T);
1111

@@ -21,7 +21,6 @@ const SHARD_BITS: usize = 0;
2121
pub const SHARDS: usize = 1 << SHARD_BITS;
2222

2323
/// An array of cache-line aligned inner locked structures with convenience methods.
24-
#[derive(Clone)]
2524
pub struct Sharded<T> {
2625
shards: [CacheAligned<Lock<T>>; SHARDS],
2726
}

0 commit comments

Comments
 (0)