about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/collect/generics_of.rs
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2025-05-01 16:22:31 +0100
committerBoxy <rust@boxyuwu.dev>2025-05-22 12:47:19 +0100
commit217c4ad427a5dbf6b23f23c70358a31064884231 (patch)
treed3a8c985eb24510dbd38835f723627cd3734f948 /compiler/rustc_hir_analysis/src/collect/generics_of.rs
parentb1774b8d7382325d2bb5cc518e463ae9d6de5898 (diff)
downloadrust-217c4ad427a5dbf6b23f23c70358a31064884231.tar.gz
rust-217c4ad427a5dbf6b23f23c70358a31064884231.zip
Review Comments
Diffstat (limited to 'compiler/rustc_hir_analysis/src/collect/generics_of.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/collect/generics_of.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/generics_of.rs b/compiler/rustc_hir_analysis/src/collect/generics_of.rs
index d261f3f85fe..7eb896f0bf1 100644
--- a/compiler/rustc_hir_analysis/src/collect/generics_of.rs
+++ b/compiler/rustc_hir_analysis/src/collect/generics_of.rs
@@ -106,7 +106,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
 
             match tcx.anon_const_kind(def_id) {
                 // Stable: anon consts are not able to use any generic parameters...
-                ty::AnonConstKind::MCGConst => None,
+                ty::AnonConstKind::MCG => None,
                 // we provide generics to repeat expr counts as a backwards compatibility hack. #76200
                 ty::AnonConstKind::RepeatExprCount => Some(parent_did),
 
@@ -116,13 +116,13 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
                 // We could potentially mirror the hack done for defaults of generic parameters but
                 // this case just doesn't come up much compared to `const N: u32 = ...`. Long term the
                 // hack for defaulted parameters should be removed eventually anyway.
-                ty::AnonConstKind::GCEConst if in_param_ty => None,
+                ty::AnonConstKind::GCE if in_param_ty => None,
                 // GCE anon consts as a default for a generic parameter should have their provided generics
                 // "truncated" up to whatever generic parameter this anon const is within the default of.
                 //
                 // FIXME(generic_const_exprs): This only handles `const N: usize = /*defid*/` but not type
                 // parameter defaults, e.g. `T = Foo</*defid*/>`.
-                ty::AnonConstKind::GCEConst
+                ty::AnonConstKind::GCE
                     if let Some(param_id) =
                         tcx.hir_opt_const_param_default_param_def_id(hir_id) =>
                 {
@@ -169,7 +169,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
                         has_late_bound_regions: generics.has_late_bound_regions,
                     };
                 }
-                ty::AnonConstKind::GCEConst => Some(parent_did),
+                ty::AnonConstKind::GCE => Some(parent_did),
 
                 // Field defaults are allowed to use generic parameters, e.g. `field: u32 = /*defid: N + 1*/`
                 ty::AnonConstKind::NonTypeSystem