|
13 | 13 | pub use self::BlockCheckMode::*; |
14 | 14 | pub use self::CaptureClause::*; |
15 | 15 | pub use self::FunctionRetTy::*; |
16 | | -pub use self::ForeignItem_::*; |
17 | 16 | pub use self::Item_::*; |
18 | 17 | pub use self::Mutability::*; |
19 | 18 | pub use self::PrimTy::*; |
@@ -2192,30 +2191,30 @@ pub enum AssociatedItemKind { |
2192 | 2191 | pub struct ForeignItem { |
2193 | 2192 | pub name: Name, |
2194 | 2193 | pub attrs: HirVec<Attribute>, |
2195 | | - pub node: ForeignItem_, |
| 2194 | + pub node: ForeignItemKind, |
2196 | 2195 | pub id: NodeId, |
2197 | 2196 | pub span: Span, |
2198 | 2197 | pub vis: Visibility, |
2199 | 2198 | } |
2200 | 2199 |
|
2201 | 2200 | /// An item within an `extern` block |
2202 | 2201 | #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] |
2203 | | -pub enum ForeignItem_ { |
| 2202 | +pub enum ForeignItemKind { |
2204 | 2203 | /// A foreign function |
2205 | | - ForeignItemFn(P<FnDecl>, HirVec<Ident>, Generics), |
| 2204 | + Fn(P<FnDecl>, HirVec<Ident>, Generics), |
2206 | 2205 | /// A foreign static item (`static ext: u8`), with optional mutability |
2207 | 2206 | /// (the boolean is true when mutable) |
2208 | | - ForeignItemStatic(P<Ty>, bool), |
| 2207 | + Static(P<Ty>, bool), |
2209 | 2208 | /// A foreign type |
2210 | | - ForeignItemType, |
| 2209 | + Type, |
2211 | 2210 | } |
2212 | 2211 |
|
2213 | | -impl ForeignItem_ { |
| 2212 | +impl ForeignItemKind { |
2214 | 2213 | pub fn descriptive_variant(&self) -> &str { |
2215 | 2214 | match *self { |
2216 | | - ForeignItemFn(..) => "foreign function", |
2217 | | - ForeignItemStatic(..) => "foreign static item", |
2218 | | - ForeignItemType => "foreign type", |
| 2215 | + ForeignItemKind::Fn(..) => "foreign function", |
| 2216 | + ForeignItemKind::Static(..) => "foreign static item", |
| 2217 | + ForeignItemKind::Type => "foreign type", |
2219 | 2218 | } |
2220 | 2219 | } |
2221 | 2220 | } |
|
0 commit comments