Skip to content

Commit 44ff785

Browse files
committed
Remove alias rustc_data_structures::sync::OnceLock
1 parent 1cf7a05 commit 44ff785

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

compiler/rustc_data_structures/src/sync.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ mod mode {
9797

9898
// FIXME(parallel_compiler): Get rid of these aliases across the compiler.
9999

100-
pub use std::sync::OnceLock;
101100
// Use portable AtomicU64 for targets without native 64-bit atomics
102101
#[cfg(target_has_atomic = "64")]
103102
pub use std::sync::atomic::AtomicU64;

compiler/rustc_interface/src/passes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ use std::any::Any;
22
use std::ffi::OsString;
33
use std::io::{self, BufWriter, Write};
44
use std::path::{Path, PathBuf};
5-
use std::sync::{Arc, LazyLock};
5+
use std::sync::{Arc, LazyLock, OnceLock};
66
use std::{env, fs, iter};
77

88
use rustc_ast as ast;
99
use rustc_codegen_ssa::traits::CodegenBackend;
1010
use rustc_data_structures::parallel;
1111
use rustc_data_structures::steal::Steal;
12-
use rustc_data_structures::sync::{AppendOnlyIndexVec, FreezeLock, OnceLock, WorkerLocal};
12+
use rustc_data_structures::sync::{AppendOnlyIndexVec, FreezeLock, WorkerLocal};
1313
use rustc_expand::base::{ExtCtxt, LintStoreExpand};
1414
use rustc_feature::Features;
1515
use rustc_fs_util::try_canonicalize;

compiler/rustc_metadata/src/rmeta/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::iter::TrustedLen;
44
use std::path::Path;
5-
use std::sync::Arc;
5+
use std::sync::{Arc, OnceLock};
66
use std::{io, iter, mem};
77

88
pub(super) use cstore_impl::provide;
@@ -11,7 +11,7 @@ use rustc_ast as ast;
1111
use rustc_data_structures::fingerprint::Fingerprint;
1212
use rustc_data_structures::fx::FxIndexMap;
1313
use rustc_data_structures::owned_slice::OwnedSlice;
14-
use rustc_data_structures::sync::{Lock, OnceLock};
14+
use rustc_data_structures::sync::Lock;
1515
use rustc_data_structures::unhash::UnhashMap;
1616
use rustc_expand::base::{SyntaxExtension, SyntaxExtensionKind};
1717
use rustc_expand::proc_macro::{AttrProcMacro, BangProcMacro, DeriveProcMacro};

compiler/rustc_middle/src/mir/basic_blocks.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
use std::sync::OnceLock;
2+
13
use rustc_data_structures::fx::FxHashMap;
24
use rustc_data_structures::graph;
35
use rustc_data_structures::graph::dominators::{Dominators, dominators};
46
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
5-
use rustc_data_structures::sync::OnceLock;
67
use rustc_index::{IndexSlice, IndexVec};
78
use rustc_macros::{HashStable, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable};
89
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};

compiler/rustc_query_system/src/query/caches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::fmt::Debug;
22
use std::hash::Hash;
3+
use std::sync::OnceLock;
34

45
use rustc_data_structures::fx::FxHashMap;
56
use rustc_data_structures::sharded::{self, Sharded};
6-
use rustc_data_structures::sync::OnceLock;
77
pub use rustc_data_structures::vec_cache::VecCache;
88
use rustc_hir::def_id::LOCAL_CRATE;
99
use rustc_index::Idx;

src/doc/rustc-dev-guide/src/parallel-rustc.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
4646

4747
| data structure | parallel | non-parallel |
4848
| -------------------------------- | --------------------------------------------------- | ------------ |
49-
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
5049
| Lock\<T> | (parking_lot::Mutex\<T>) | (std::cell::RefCell) |
5150
| RwLock\<T> | (parking_lot::RwLock\<T>) | (std::cell::RefCell) |
5251
| MTRef<'a, T> | &'a T | &'a mut T |

0 commit comments

Comments
 (0)