@@ -3986,8 +3986,8 @@ impl<'hir> Item<'hir> {
39863986 expect_static, ( Ident , & ' hir Ty <' hir>, Mutability , BodyId ) ,
39873987 ItemKind :: Static ( ident, ty, mutbl, body) , ( * ident, ty, * mutbl, * body) ;
39883988
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 ) ;
39913991
39923992 expect_fn, ( Ident , & FnSig <' hir>, & ' hir Generics <' hir>, BodyId ) ,
39933993 ItemKind :: Fn { ident, sig, generics, body, .. } , ( * ident, sig, generics, * body) ;
@@ -4157,7 +4157,7 @@ pub enum ItemKind<'hir> {
41574157 /// A `static` item.
41584158 Static ( Ident , & ' hir Ty < ' hir > , Mutability , BodyId ) ,
41594159 /// 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 > > ) ,
41614161 /// A function declaration.
41624162 Fn {
41634163 ident : Ident ,
@@ -4252,7 +4252,7 @@ impl ItemKind<'_> {
42524252 Some ( match self {
42534253 ItemKind :: Fn { generics, .. }
42544254 | ItemKind :: TyAlias ( _, _, generics)
4255- | ItemKind :: Const ( _, _, generics, _)
4255+ | ItemKind :: Const ( _, _, generics, _, _ )
42564256 | ItemKind :: Enum ( _, _, generics)
42574257 | ItemKind :: Struct ( _, _, generics)
42584258 | ItemKind :: Union ( _, _, generics)
@@ -4455,7 +4455,7 @@ impl<'hir> OwnerNode<'hir> {
44554455 OwnerNode :: Item ( Item {
44564456 kind :
44574457 ItemKind :: Static ( _, _, _, body)
4458- | ItemKind :: Const ( _, _, _, body)
4458+ | ItemKind :: Const ( _, _, _, body, _ )
44594459 | ItemKind :: Fn { body, .. } ,
44604460 ..
44614461 } )
@@ -4681,7 +4681,7 @@ impl<'hir> Node<'hir> {
46814681 Node :: Item ( it) => match it. kind {
46824682 ItemKind :: TyAlias ( _, ty, _)
46834683 | ItemKind :: Static ( _, ty, _, _)
4684- | ItemKind :: Const ( _, ty, _, _) => Some ( ty) ,
4684+ | ItemKind :: Const ( _, ty, _, _, _ ) => Some ( ty) ,
46854685 ItemKind :: Impl ( impl_item) => Some ( & impl_item. self_ty ) ,
46864686 _ => None ,
46874687 } ,
@@ -4712,7 +4712,7 @@ impl<'hir> Node<'hir> {
47124712 Node :: Item ( Item {
47134713 owner_id,
47144714 kind :
4715- ItemKind :: Const ( _, _, _, body)
4715+ ItemKind :: Const ( _, _, _, body, _ )
47164716 | ItemKind :: Static ( .., body)
47174717 | ItemKind :: Fn { body, .. } ,
47184718 ..
0 commit comments