Skip to content

Commit 407e13a

Browse files
committed
Auto merge of #136471 - safinaskar:parallel, r=SparrowLii
tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` This is continuation of rust-lang/rust#132282 . I'm pretty sure I did everything right. In particular, I searched all occurrences of `Lrc` in submodules and made sure that they don't need replacement. There are other possibilities, through. We can define `enum Lrc<T> { Rc(Rc<T>), Arc(Arc<T>) }`. Or we can make `Lrc` a union and on every clone we can read from special thread-local variable. Or we can add a generic parameter to `Lrc` and, yes, this parameter will be everywhere across all codebase. So, if you think we should take some alternative approach, then don't merge this PR. But if it is decided to stick with `Arc`, then, please, merge. cc "Parallel Rustc Front-end" ( rust-lang/rust#113349 ) r? SparrowLii `@rustbot` label WG-compiler-parallel
2 parents ad9f720 + 0898c3e commit 407e13a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/bin/miri.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::num::NonZero;
2929
use std::ops::Range;
3030
use std::path::PathBuf;
3131
use std::str::FromStr;
32-
use std::sync::Once;
32+
use std::sync::{Arc, Once};
3333
use std::sync::atomic::{AtomicI32, AtomicU32, Ordering};
3434

3535
use miri::{
@@ -38,7 +38,6 @@ use miri::{
3838
};
3939
use rustc_abi::ExternAbi;
4040
use rustc_data_structures::sync;
41-
use rustc_data_structures::sync::Lrc;
4241
use rustc_driver::Compilation;
4342
use rustc_hir::def_id::LOCAL_CRATE;
4443
use rustc_hir::{self as hir, Node};
@@ -134,7 +133,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
134133
// HACK: rustc will emit "crate ... required to be available in rlib format, but
135134
// was not found in this form" errors once we use `tcx.dependency_formats()` if
136135
// there's no rlib provided, so setting a dummy path here to workaround those errors.
137-
Lrc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
136+
Arc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
138137
crate_source
139138
};
140139
});

0 commit comments

Comments
 (0)