Skip to content

Commit 5843858

Browse files
committed
Don't access self.mask with a single shard
1 parent 6620882 commit 5843858

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_data_structures/src/sharded.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<T> Sharded<T> {
4646
fn mask(&self) -> usize {
4747
#[cfg(parallel_compiler)]
4848
{
49-
self.mask
49+
if SHARDS == 1 { 0 } else { self.mask }
5050
}
5151
#[cfg(not(parallel_compiler))]
5252
{

0 commit comments

Comments
 (0)