Skip to content

Commit fe650ce

Browse files
committed
Rename some functions that are not part of lowering
1 parent f51c987 commit fe650ce

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
@@ -782,7 +782,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
782782
tcx.ensure_ok().generics_of(def_id);
783783
tcx.ensure_ok().type_of(def_id);
784784
tcx.ensure_ok().predicates_of(def_id);
785-
crate::collect::lower_enum_variant_types(tcx, def_id.to_def_id());
785+
crate::collect::check_enum_variant_types(tcx, def_id.to_def_id());
786786
check_enum(tcx, def_id);
787787
check_variances_for_type_defn(tcx, def_id);
788788
}
@@ -864,7 +864,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
864864
}
865865

866866
if let Some((_, ctor_def_id)) = adt.ctor {
867-
crate::collect::lower_variant_ctor(tcx, ctor_def_id.expect_local());
867+
crate::collect::check_ctor(tcx, ctor_def_id.expect_local());
868868
}
869869
match def_kind {
870870
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
@@ -605,13 +605,13 @@ fn get_new_lifetime_name<'tcx>(
605605
(1..).flat_map(a_to_z_repeat_n).find(|lt| !existing_lifetimes.contains(lt.as_str())).unwrap()
606606
}
607607

608-
pub(super) fn lower_variant_ctor(tcx: TyCtxt<'_>, def_id: LocalDefId) {
608+
pub(super) fn check_ctor(tcx: TyCtxt<'_>, def_id: LocalDefId) {
609609
tcx.ensure_ok().generics_of(def_id);
610610
tcx.ensure_ok().type_of(def_id);
611611
tcx.ensure_ok().predicates_of(def_id);
612612
}
613613

614-
pub(super) fn lower_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
614+
pub(super) fn check_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
615615
let def = tcx.adt_def(def_id);
616616
let repr_type = def.repr().discr_type();
617617
let initial = repr_type.initial_discriminant(tcx);
@@ -646,7 +646,7 @@ pub(super) fn lower_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
646646

647647
// Lower the ctor, if any. This also registers the variant as an item.
648648
if let Some(ctor_def_id) = variant.ctor_def_id() {
649-
lower_variant_ctor(tcx, ctor_def_id.expect_local());
649+
check_ctor(tcx, ctor_def_id.expect_local());
650650
}
651651
}
652652
}

0 commit comments

Comments
 (0)