Merge pull request #4182 from rust-lang/rustup-2025-02-07

Automatic Rustup
This commit is contained in:
Ralf Jung 2025-02-07 07:23:43 +00:00 committed by GitHub
commit ca5bb6bf7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 6 deletions

View File

@ -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"))
} }
} }

View File

@ -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"))
} }
} }

View File

@ -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

View File

@ -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 |