tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc`
This commit is contained in:
parent
43dd8e2d9f
commit
9f683c9070
|
|
@ -15,9 +15,9 @@ extern crate rustc_span;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use rustc_ast_pretty::pprust::item_to_string;
|
use rustc_ast_pretty::pprust::item_to_string;
|
||||||
use rustc_data_structures::sync::Lrc;
|
|
||||||
use rustc_driver::{Compilation, run_compiler};
|
use rustc_driver::{Compilation, run_compiler};
|
||||||
use rustc_interface::interface::{Compiler, Config};
|
use rustc_interface::interface::{Compiler, Config};
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
|
|
@ -43,7 +43,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
|
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
|
||||||
Err(io::Error::other("oops"))
|
Err(io::Error::other("oops"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ extern crate rustc_span;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use rustc_ast_pretty::pprust::item_to_string;
|
use rustc_ast_pretty::pprust::item_to_string;
|
||||||
use rustc_data_structures::sync::Lrc;
|
|
||||||
use rustc_driver::{Compilation, run_compiler};
|
use rustc_driver::{Compilation, run_compiler};
|
||||||
use rustc_interface::interface::{Compiler, Config};
|
use rustc_interface::interface::{Compiler, Config};
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
|
|
@ -43,7 +43,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
|
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
|
||||||
Err(io::Error::other("oops"))
|
Err(io::Error::other("oops"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ Lints are registered via the [`LintStore::register_lint`] function. This should
|
||||||
happen just once for any lint, or an ICE will occur.
|
happen just once for any lint, or an ICE will occur.
|
||||||
|
|
||||||
Once the registration is complete, we "freeze" the lint store by placing it in
|
Once the registration is complete, we "freeze" the lint store by placing it in
|
||||||
an `Lrc`.
|
an `Arc`.
|
||||||
|
|
||||||
Lint passes are registered separately into one of the categories
|
Lint passes are registered separately into one of the categories
|
||||||
(pre-expansion, early, late, late module). Passes are registered as a closure
|
(pre-expansion, early, late, late module). Passes are registered as a closure
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
|
||||||
|
|
||||||
| data structure | parallel | non-parallel |
|
| data structure | parallel | non-parallel |
|
||||||
| -------------------------------- | --------------------------------------------------- | ------------ |
|
| -------------------------------- | --------------------------------------------------- | ------------ |
|
||||||
| Lrc | std::sync::Arc | std::rc::Rc |
|
|
||||||
| Weak | std::sync::Weak | std::rc::Weak |
|
| Weak | std::sync::Weak | std::rc::Weak |
|
||||||
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
|
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
|
||||||
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
|
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue