@@ -2890,6 +2890,9 @@ pub struct Fn {
28902890 pub body : Option < P < Block > > ,
28912891}
28922892
2893+ #[ derive( Clone , Encodable , Decodable , Debug ) ]
2894+ pub struct Static ( pub P < Ty > , pub Mutability , pub Option < P < Expr > > ) ;
2895+
28932896#[ derive( Clone , Encodable , Decodable , Debug ) ]
28942897pub enum ItemKind {
28952898 /// An `extern crate` item, with the optional *original* crate name if the crate was renamed.
@@ -2903,7 +2906,7 @@ pub enum ItemKind {
29032906 /// A static item (`static`).
29042907 ///
29052908 /// E.g., `static FOO: i32 = 42;` or `static FOO: &'static str = "bar";`.
2906- Static ( P < Ty > , Mutability , Option < P < Expr > > ) ,
2909+ Static ( Static ) ,
29072910 /// A constant item (`const`).
29082911 ///
29092912 /// E.g., `const FOO: i32 = 42;`.
@@ -2975,7 +2978,7 @@ impl ItemKind {
29752978 match self {
29762979 ItemKind :: ExternCrate ( ..) => "extern crate" ,
29772980 ItemKind :: Use ( ..) => "`use` import" ,
2978- ItemKind :: Static ( .. ) => "static item" ,
2981+ ItemKind :: Static ( Static ( .. ) ) => "static item" ,
29792982 ItemKind :: Const ( ..) => "constant item" ,
29802983 ItemKind :: Fn ( ..) => "function" ,
29812984 ItemKind :: Mod ( ..) => "module" ,
@@ -3084,7 +3087,7 @@ pub enum ForeignItemKind {
30843087impl From < ForeignItemKind > for ItemKind {
30853088 fn from ( foreign_item_kind : ForeignItemKind ) -> ItemKind {
30863089 match foreign_item_kind {
3087- ForeignItemKind :: Static ( a, b, c) => ItemKind :: Static ( a, b, c) ,
3090+ ForeignItemKind :: Static ( a, b, c) => ItemKind :: Static ( Static ( a, b, c) ) ,
30883091 ForeignItemKind :: Fn ( fn_kind) => ItemKind :: Fn ( fn_kind) ,
30893092 ForeignItemKind :: TyAlias ( ty_alias_kind) => ItemKind :: TyAlias ( ty_alias_kind) ,
30903093 ForeignItemKind :: MacCall ( a) => ItemKind :: MacCall ( a) ,
@@ -3097,7 +3100,7 @@ impl TryFrom<ItemKind> for ForeignItemKind {
30973100
30983101 fn try_from ( item_kind : ItemKind ) -> Result < ForeignItemKind , ItemKind > {
30993102 Ok ( match item_kind {
3100- ItemKind :: Static ( a, b, c) => ForeignItemKind :: Static ( a, b, c) ,
3103+ ItemKind :: Static ( Static ( a, b, c) ) => ForeignItemKind :: Static ( a, b, c) ,
31013104 ItemKind :: Fn ( fn_kind) => ForeignItemKind :: Fn ( fn_kind) ,
31023105 ItemKind :: TyAlias ( ty_alias_kind) => ForeignItemKind :: TyAlias ( ty_alias_kind) ,
31033106 ItemKind :: MacCall ( a) => ForeignItemKind :: MacCall ( a) ,
0 commit comments