tree-wide: parallel: Fully removed all Lrc, replaced with Arc

This commit is contained in:
Askar Safin
2025-02-03 06:44:41 +03:00
parent 613bdd4997
commit 0a21f1d0a2
77 changed files with 405 additions and 395 deletions

View File

@@ -1,5 +1,6 @@
use std::sync::Arc;
use rustc_ast::{self as ast, *};
use rustc_data_structures::sync::Lrc;
use rustc_hir as hir;
use rustc_hir::GenericArg;
use rustc_hir::def::{DefKind, PartialRes, Res};
@@ -72,7 +73,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
let bound_modifier_allowed_features = if let Res::Def(DefKind::Trait, async_def_id) = res
&& self.tcx.async_fn_trait_kind_from_def_id(async_def_id).is_some()
{
Some(Lrc::clone(&self.allow_async_fn_traits))
Some(Arc::clone(&self.allow_async_fn_traits))
} else {
None
};
@@ -257,7 +258,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
// Additional features ungated with a bound modifier like `async`.
// This is passed down to the implicit associated type binding in
// parenthesized bounds.
bound_modifier_allowed_features: Option<Lrc<[Symbol]>>,
bound_modifier_allowed_features: Option<Arc<[Symbol]>>,
) -> hir::PathSegment<'hir> {
debug!("path_span: {:?}, lower_path_segment(segment: {:?})", path_span, segment);
let (mut generic_args, infer_args) = if let Some(generic_args) = segment.args.as_deref() {
@@ -490,7 +491,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
&mut self,
data: &ParenthesizedArgs,
itctx: ImplTraitContext,
bound_modifier_allowed_features: Option<Lrc<[Symbol]>>,
bound_modifier_allowed_features: Option<Arc<[Symbol]>>,
) -> (GenericArgsCtor<'hir>, bool) {
// Switch to `PassThrough` mode for anonymous lifetimes; this
// means that we permit things like `&Ref<T>`, where `Ref` has