Skip to content

Commit 9f683c9

Browse files
committed
tree-wide: parallel: Fully removed all Lrc, replaced with Arc
1 parent 43dd8e2 commit 9f683c9

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Diff for: examples/rustc-driver-example.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ extern crate rustc_span;
1515

1616
use std::io;
1717
use std::path::Path;
18+
use std::sync::Arc;
1819

1920
use rustc_ast_pretty::pprust::item_to_string;
20-
use rustc_data_structures::sync::Lrc;
2121
use rustc_driver::{Compilation, run_compiler};
2222
use rustc_interface::interface::{Compiler, Config};
2323
use rustc_middle::ty::TyCtxt;
@@ -43,7 +43,7 @@ fn main() {
4343
}
4444
}
4545

46-
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
46+
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
4747
Err(io::Error::other("oops"))
4848
}
4949
}

Diff for: examples/rustc-driver-interacting-with-the-ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ extern crate rustc_span;
1515

1616
use std::io;
1717
use std::path::Path;
18+
use std::sync::Arc;
1819

1920
use rustc_ast_pretty::pprust::item_to_string;
20-
use rustc_data_structures::sync::Lrc;
2121
use rustc_driver::{Compilation, run_compiler};
2222
use rustc_interface::interface::{Compiler, Config};
2323
use rustc_middle::ty::TyCtxt;
@@ -43,7 +43,7 @@ fn main() {
4343
}
4444
}
4545

46-
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
46+
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
4747
Err(io::Error::other("oops"))
4848
}
4949
}

Diff for: src/diagnostics/lintstore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Lints are registered via the [`LintStore::register_lint`] function. This should
5454
happen just once for any lint, or an ICE will occur.
5555

5656
Once the registration is complete, we "freeze" the lint store by placing it in
57-
an `Lrc`.
57+
an `Arc`.
5858

5959
Lint passes are registered separately into one of the categories
6060
(pre-expansion, early, late, late module). Passes are registered as a closure

Diff for: src/parallel-rustc.md

-1
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-
| Lrc | std::sync::Arc | std::rc::Rc |
5049
| Weak | std::sync::Weak | std::rc::Weak |
5150
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
5251
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |

0 commit comments

Comments
 (0)