Skip to content

Commit 3bd9347

Browse files
committed
propagate_self_ty -> self_ty_propagation_kind
1 parent afb4539 commit 3bd9347

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

compiler/rustc_ast_lowering/src/delegation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
409409
child_seg_id: generics.child.args_segment_id,
410410
child_seg_id_for_sig: generics.child.segment_id_for_sig(),
411411
parent_seg_id_for_sig: generics.parent.segment_id_for_sig(),
412-
propagate_self_ty: generics.propagate_self_ty,
412+
self_ty_propagation_kind: generics.self_ty_propagation_kind,
413413
group_id: {
414414
let id = match source {
415415
DelegationSource::Single => None,
@@ -629,7 +629,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
629629

630630
// Explicitly create `Self` self-type in case of infers or static
631631
// free-to-trait reuses.
632-
let ty = match generics.propagate_self_ty {
632+
let ty = match generics.self_ty_propagation_kind {
633633
Some(hir::DelegationSelfTyPropagationKind::SelfParam) => {
634634
let kind = hir::TyKind::Path(
635635
DelegationGenericArgsIterator::create_generic_arg_path(
@@ -654,7 +654,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
654654
};
655655

656656
if let Some(hir::DelegationSelfTyPropagationKind::SelfTy(id)) =
657-
generics.propagate_self_ty.as_mut()
657+
generics.self_ty_propagation_kind.as_mut()
658658
{
659659
*id = match new_path {
660660
hir::QPath::Resolved(ty, _) => ty,

compiler/rustc_ast_lowering/src/delegation/generics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl GenericsGenerationResult<'_> {
8686
pub(super) struct GenericsGenerationResults<'hir> {
8787
pub(super) parent: GenericsGenerationResult<'hir>,
8888
pub(super) child: GenericsGenerationResult<'hir>,
89-
pub(super) propagate_self_ty: Option<hir::DelegationSelfTyPropagationKind>,
89+
pub(super) self_ty_propagation_kind: Option<hir::DelegationSelfTyPropagationKind>,
9090
}
9191

9292
#[derive(Debug)]
@@ -357,7 +357,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
357357
let child = DelegationGenerics::generate_all(sig_params, GenericsPosition::Child, true);
358358
let child = GenericsGenerationResult::new(child);
359359

360-
return GenericsGenerationResults { parent, child, propagate_self_ty: None };
360+
return GenericsGenerationResults { parent, child, self_ty_propagation_kind: None };
361361
}
362362

363363
let delegation_in_free_ctx =
@@ -422,7 +422,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
422422
GenericsGenerationResults {
423423
parent: GenericsGenerationResult::new(parent_generics),
424424
child: GenericsGenerationResult::new(child_generics),
425-
propagate_self_ty: match free_to_trait_delegation {
425+
self_ty_propagation_kind: match free_to_trait_delegation {
426426
true => Some(match qself_is_none {
427427
true => hir::DelegationSelfTyPropagationKind::SelfParam,
428428
false => match qself_is_infer {

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3867,7 +3867,7 @@ pub struct DelegationInfo {
38673867
pub child_seg_id: HirId,
38683868
pub parent_seg_id_for_sig: Option<HirId>,
38693869
pub child_seg_id_for_sig: Option<HirId>,
3870-
pub propagate_self_ty: Option<DelegationSelfTyPropagationKind>,
3870+
pub self_ty_propagation_kind: Option<DelegationSelfTyPropagationKind>,
38713871
pub group_id: Option<(LocalExpnId, bool /* unused_target_expr */)>,
38723872
}
38733873

compiler/rustc_hir_analysis/src/delegation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ fn create_self_position_kind(
8383
| (FnKind::AssocTrait, FnKind::Free) => SelfPositionKind::Zero,
8484

8585
(FnKind::Free, FnKind::AssocTrait) => {
86-
let propagate_self_ty = tcx.hir_delegation_info(delegation_id).propagate_self_ty;
87-
SelfPositionKind::AfterLifetimes(propagate_self_ty)
86+
let kind = tcx.hir_delegation_info(delegation_id).self_ty_propagation_kind;
87+
SelfPositionKind::AfterLifetimes(kind)
8888
}
8989

9090
_ => SelfPositionKind::None,

0 commit comments

Comments
 (0)