diff options
| author | Askar Safin <safinaskar@mail.ru> | 2025-02-03 06:44:41 +0300 |
|---|---|---|
| committer | Askar Safin <safinaskar@mail.ru> | 2025-02-03 13:25:57 +0300 |
| commit | 0a21f1d0a2fe9e84727a2de735fdcf55e8820db6 (patch) | |
| tree | 790f1892d90201443d543562fb9d6cdaf0c6b33f /compiler/rustc_query_system | |
| parent | 613bdd49978298648ed05ace086bd1ecad54b44a (diff) | |
| download | rust-0a21f1d0a2fe9e84727a2de735fdcf55e8820db6.tar.gz rust-0a21f1d0a2fe9e84727a2de735fdcf55e8820db6.zip | |
tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc`
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/ich/hcx.rs | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index fa095b10884..7988afd3e13 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -11,7 +11,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::profiling::{QueryInvocationId, SelfProfilerRef}; use rustc_data_structures::sharded::{self, Sharded}; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; -use rustc_data_structures::sync::{AtomicU32, AtomicU64, Lock, Lrc}; +use rustc_data_structures::sync::{AtomicU32, AtomicU64, Lock}; use rustc_data_structures::unord::UnordMap; use rustc_index::IndexVec; use rustc_macros::{Decodable, Encodable}; @@ -29,13 +29,13 @@ use crate::query::{QueryContext, QuerySideEffects}; #[derive(Clone)] pub struct DepGraph<D: Deps> { - data: Option<Lrc<DepGraphData<D>>>, + data: Option<Arc<DepGraphData<D>>>, /// This field is used for assigning DepNodeIndices when running in /// non-incremental mode. Even in non-incremental mode we make sure that /// each task has a `DepNodeIndex` that uniquely identifies it. This unique /// ID is used for self-profiling. - virtual_dep_node_index: Lrc<AtomicU32>, + virtual_dep_node_index: Arc<AtomicU32>, } rustc_index::newtype_index! { @@ -171,7 +171,7 @@ impl<D: Deps> DepGraph<D> { } DepGraph { - data: Some(Lrc::new(DepGraphData { + data: Some(Arc::new(DepGraphData { previous_work_products: prev_work_products, dep_node_debug: Default::default(), current, @@ -180,12 +180,12 @@ impl<D: Deps> DepGraph<D> { colors, debug_loaded_from_disk: Default::default(), })), - virtual_dep_node_index: Lrc::new(AtomicU32::new(0)), + virtual_dep_node_index: Arc::new(AtomicU32::new(0)), } } pub fn new_disabled() -> DepGraph<D> { - DepGraph { data: None, virtual_dep_node_index: Lrc::new(AtomicU32::new(0)) } + DepGraph { data: None, virtual_dep_node_index: Arc::new(AtomicU32::new(0)) } } #[inline] diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_query_system/src/ich/hcx.rs index 6b737ceb50a..cf50e61e72b 100644 --- a/compiler/rustc_query_system/src/ich/hcx.rs +++ b/compiler/rustc_query_system/src/ich/hcx.rs @@ -1,6 +1,7 @@ +use std::sync::Arc; + use rustc_ast as ast; use rustc_data_structures::stable_hasher::{HashStable, HashingControls, StableHasher}; -use rustc_data_structures::sync::Lrc; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::definitions::DefPathHash; use rustc_session::Session; @@ -117,7 +118,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> { fn span_data_to_lines_and_cols( &mut self, span: &SpanData, - ) -> Option<(Lrc<SourceFile>, usize, BytePos, usize, BytePos)> { + ) -> Option<(Arc<SourceFile>, usize, BytePos, usize, BytePos)> { self.source_map().span_data_to_lines_and_cols(span) } |
