@@ -242,7 +242,7 @@ impl<'hir> ConstArg<'hir> {
242242 }
243243 }
244244
245- pub fn hir_id ( & self ) -> HirId {
245+ pub fn anon_const_hir_id ( & self ) -> HirId {
246246 match self . kind {
247247 ConstArgKind :: Anon ( anon) => anon. hir_id ,
248248 }
@@ -288,7 +288,7 @@ impl GenericArg<'_> {
288288 match self {
289289 GenericArg :: Lifetime ( l) => l. hir_id ,
290290 GenericArg :: Type ( t) => t. hir_id ,
291- GenericArg :: Const ( c) => c. hir_id ( ) ,
291+ GenericArg :: Const ( c) => c. anon_const_hir_id ( ) , // FIXME
292292 GenericArg :: Infer ( i) => i. hir_id ,
293293 }
294294 }
@@ -2453,7 +2453,7 @@ impl<'hir> AssocItemConstraint<'hir> {
24532453 }
24542454
24552455 /// Obtain the const on the RHS of an assoc const equality constraint if applicable.
2456- pub fn ct ( self ) -> Option < & ' hir AnonConst > {
2456+ pub fn ct ( self ) -> Option < & ' hir ConstArg < ' hir > > {
24572457 match self . kind {
24582458 AssocItemConstraintKind :: Equality { term : Term :: Const ( ct) } => Some ( ct) ,
24592459 _ => None ,
@@ -2464,7 +2464,7 @@ impl<'hir> AssocItemConstraint<'hir> {
24642464#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
24652465pub enum Term < ' hir > {
24662466 Ty ( & ' hir Ty < ' hir > ) ,
2467- Const ( & ' hir AnonConst ) ,
2467+ Const ( & ' hir ConstArg < ' hir > ) ,
24682468}
24692469
24702470impl < ' hir > From < & ' hir Ty < ' hir > > for Term < ' hir > {
@@ -2473,8 +2473,8 @@ impl<'hir> From<&'hir Ty<'hir>> for Term<'hir> {
24732473 }
24742474}
24752475
2476- impl < ' hir > From < & ' hir AnonConst > for Term < ' hir > {
2477- fn from ( c : & ' hir AnonConst ) -> Self {
2476+ impl < ' hir > From < & ' hir ConstArg < ' hir > > for Term < ' hir > {
2477+ fn from ( c : & ' hir ConstArg < ' hir > ) -> Self {
24782478 Term :: Const ( c)
24792479 }
24802480}
0 commit comments