Skip to content

Commit 58ca4df

Browse files
Rollup merge of #155063 - josetorrs:refactor-alias-free, r=WaffleLapkin
`ty::Alias`: replace `def_id: did` with `def_id` related issue: #154941 tackling this task: - [x] replace def_id: did with def_id where possible r? @WaffleLapkin
2 parents 9a24dbf + ec582d5 commit 58ca4df

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • compiler/rustc_hir_analysis/src/hir_ty_lowering

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,22 +1134,22 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
11341134
fn lower_path_segment(
11351135
&self,
11361136
span: Span,
1137-
did: DefId,
1137+
def_id: DefId,
11381138
item_segment: &hir::PathSegment<'tcx>,
11391139
) -> Ty<'tcx> {
11401140
let tcx = self.tcx();
1141-
let args = self.lower_generic_args_of_path_segment(span, did, item_segment);
1141+
let args = self.lower_generic_args_of_path_segment(span, def_id, item_segment);
11421142

1143-
if let DefKind::TyAlias = tcx.def_kind(did)
1144-
&& tcx.type_alias_is_lazy(did)
1143+
if let DefKind::TyAlias = tcx.def_kind(def_id)
1144+
&& tcx.type_alias_is_lazy(def_id)
11451145
{
11461146
// Type aliases defined in crates that have the
11471147
// feature `lazy_type_alias` enabled get encoded as a type alias that normalization will
11481148
// then actually instantiate the where bounds of.
1149-
let alias_ty = ty::AliasTy::new_from_args(tcx, ty::Free { def_id: did }, args);
1149+
let alias_ty = ty::AliasTy::new_from_args(tcx, ty::Free { def_id }, args);
11501150
Ty::new_alias(tcx, alias_ty)
11511151
} else {
1152-
tcx.at(span).type_of(did).instantiate(tcx, args)
1152+
tcx.at(span).type_of(def_id).instantiate(tcx, args)
11531153
}
11541154
}
11551155

0 commit comments

Comments
 (0)