@@ -3986,8 +3986,8 @@ impl<'hir> Item<'hir> {
3986
3986
expect_static, ( Ident , & ' hir Ty <' hir>, Mutability , BodyId ) ,
3987
3987
ItemKind :: Static ( ident, ty, mutbl, body) , ( * ident, ty, * mutbl, * body) ;
3988
3988
3989
- expect_const, ( Ident , & ' hir Ty <' hir>, & ' hir Generics <' hir>, BodyId ) ,
3990
- ItemKind :: Const ( ident, ty, generics, body) , ( * ident, ty, generics, * body) ;
3989
+ expect_const, ( Ident , & ' hir Ty <' hir>, & ' hir Generics <' hir>, BodyId , Option < & ' hir ConstArg < ' hir>> ) ,
3990
+ ItemKind :: Const ( ident, ty, generics, body, ct ) , ( * ident, ty, generics, * body, * ct ) ;
3991
3991
3992
3992
expect_fn, ( Ident , & FnSig <' hir>, & ' hir Generics <' hir>, BodyId ) ,
3993
3993
ItemKind :: Fn { ident, sig, generics, body, .. } , ( * ident, sig, generics, * body) ;
@@ -4157,7 +4157,7 @@ pub enum ItemKind<'hir> {
4157
4157
/// A `static` item.
4158
4158
Static ( Ident , & ' hir Ty < ' hir > , Mutability , BodyId ) ,
4159
4159
/// A `const` item.
4160
- Const ( Ident , & ' hir Ty < ' hir > , & ' hir Generics < ' hir > , BodyId ) ,
4160
+ Const ( Ident , & ' hir Ty < ' hir > , & ' hir Generics < ' hir > , BodyId , Option < & ' hir ConstArg < ' hir > > ) ,
4161
4161
/// A function declaration.
4162
4162
Fn {
4163
4163
ident : Ident ,
@@ -4252,7 +4252,7 @@ impl ItemKind<'_> {
4252
4252
Some ( match self {
4253
4253
ItemKind :: Fn { generics, .. }
4254
4254
| ItemKind :: TyAlias ( _, _, generics)
4255
- | ItemKind :: Const ( _, _, generics, _)
4255
+ | ItemKind :: Const ( _, _, generics, _, _ )
4256
4256
| ItemKind :: Enum ( _, _, generics)
4257
4257
| ItemKind :: Struct ( _, _, generics)
4258
4258
| ItemKind :: Union ( _, _, generics)
@@ -4455,7 +4455,7 @@ impl<'hir> OwnerNode<'hir> {
4455
4455
OwnerNode :: Item ( Item {
4456
4456
kind :
4457
4457
ItemKind :: Static ( _, _, _, body)
4458
- | ItemKind :: Const ( _, _, _, body)
4458
+ | ItemKind :: Const ( _, _, _, body, _ )
4459
4459
| ItemKind :: Fn { body, .. } ,
4460
4460
..
4461
4461
} )
@@ -4681,7 +4681,7 @@ impl<'hir> Node<'hir> {
4681
4681
Node :: Item ( it) => match it. kind {
4682
4682
ItemKind :: TyAlias ( _, ty, _)
4683
4683
| ItemKind :: Static ( _, ty, _, _)
4684
- | ItemKind :: Const ( _, ty, _, _) => Some ( ty) ,
4684
+ | ItemKind :: Const ( _, ty, _, _, _ ) => Some ( ty) ,
4685
4685
ItemKind :: Impl ( impl_item) => Some ( & impl_item. self_ty ) ,
4686
4686
_ => None ,
4687
4687
} ,
@@ -4712,7 +4712,7 @@ impl<'hir> Node<'hir> {
4712
4712
Node :: Item ( Item {
4713
4713
owner_id,
4714
4714
kind :
4715
- ItemKind :: Const ( _, _, _, body)
4715
+ ItemKind :: Const ( _, _, _, body, _ )
4716
4716
| ItemKind :: Static ( .., body)
4717
4717
| ItemKind :: Fn { body, .. } ,
4718
4718
..
0 commit comments