Skip to content

Commit d3d4ad6

Browse files
committed
Rename some functions that are not part of lowering
1 parent 62929b9 commit d3d4ad6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
781781
tcx.ensure_ok().generics_of(def_id);
782782
tcx.ensure_ok().type_of(def_id);
783783
tcx.ensure_ok().predicates_of(def_id);
784-
crate::collect::lower_enum_variant_types(tcx, def_id.to_def_id());
784+
crate::collect::check_enum_variant_types(tcx, def_id.to_def_id());
785785
check_enum(tcx, def_id);
786786
check_variances_for_type_defn(tcx, def_id);
787787
}
@@ -863,7 +863,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
863863
}
864864

865865
if let Some((_, ctor_def_id)) = adt.ctor {
866-
crate::collect::lower_variant_ctor(tcx, ctor_def_id.expect_local());
866+
crate::collect::check_ctor(tcx, ctor_def_id.expect_local());
867867
}
868868
match def_kind {
869869
DefKind::Struct => check_struct(tcx, def_id),

compiler/rustc_hir_analysis/src/collect.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,13 @@ fn get_new_lifetime_name<'tcx>(
600600
(1..).flat_map(a_to_z_repeat_n).find(|lt| !existing_lifetimes.contains(lt.as_str())).unwrap()
601601
}
602602

603-
pub(super) fn lower_variant_ctor(tcx: TyCtxt<'_>, def_id: LocalDefId) {
603+
pub(super) fn check_ctor(tcx: TyCtxt<'_>, def_id: LocalDefId) {
604604
tcx.ensure_ok().generics_of(def_id);
605605
tcx.ensure_ok().type_of(def_id);
606606
tcx.ensure_ok().predicates_of(def_id);
607607
}
608608

609-
pub(super) fn lower_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
609+
pub(super) fn check_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
610610
let def = tcx.adt_def(def_id);
611611
let repr_type = def.repr().discr_type();
612612
let initial = repr_type.initial_discriminant(tcx);
@@ -641,7 +641,7 @@ pub(super) fn lower_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
641641

642642
// Lower the ctor, if any. This also registers the variant as an item.
643643
if let Some(ctor_def_id) = variant.ctor_def_id() {
644-
lower_variant_ctor(tcx, ctor_def_id.expect_local());
644+
check_ctor(tcx, ctor_def_id.expect_local());
645645
}
646646
}
647647
}

0 commit comments

Comments
 (0)