@@ -242,7 +242,7 @@ impl<'hir> ConstArg<'hir> {
242
242
}
243
243
}
244
244
245
- pub fn hir_id ( & self ) -> HirId {
245
+ pub fn anon_const_hir_id ( & self ) -> HirId {
246
246
match self . kind {
247
247
ConstArgKind :: Anon ( anon) => anon. hir_id ,
248
248
}
@@ -288,7 +288,7 @@ impl GenericArg<'_> {
288
288
match self {
289
289
GenericArg :: Lifetime ( l) => l. hir_id ,
290
290
GenericArg :: Type ( t) => t. hir_id ,
291
- GenericArg :: Const ( c) => c. hir_id ( ) ,
291
+ GenericArg :: Const ( c) => c. anon_const_hir_id ( ) , // FIXME
292
292
GenericArg :: Infer ( i) => i. hir_id ,
293
293
}
294
294
}
@@ -2453,7 +2453,7 @@ impl<'hir> AssocItemConstraint<'hir> {
2453
2453
}
2454
2454
2455
2455
/// 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 > > {
2457
2457
match self . kind {
2458
2458
AssocItemConstraintKind :: Equality { term : Term :: Const ( ct) } => Some ( ct) ,
2459
2459
_ => None ,
@@ -2464,7 +2464,7 @@ impl<'hir> AssocItemConstraint<'hir> {
2464
2464
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2465
2465
pub enum Term < ' hir > {
2466
2466
Ty ( & ' hir Ty < ' hir > ) ,
2467
- Const ( & ' hir AnonConst ) ,
2467
+ Const ( & ' hir ConstArg < ' hir > ) ,
2468
2468
}
2469
2469
2470
2470
impl < ' hir > From < & ' hir Ty < ' hir > > for Term < ' hir > {
@@ -2473,8 +2473,8 @@ impl<'hir> From<&'hir Ty<'hir>> for Term<'hir> {
2473
2473
}
2474
2474
}
2475
2475
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 {
2478
2478
Term :: Const ( c)
2479
2479
}
2480
2480
}
0 commit comments