|
12 | 12 | //! that clean them. |
13 | 13 |
|
14 | 14 | pub use self::Type::*; |
15 | | -pub use self::VariantKind::*; |
16 | 15 | pub use self::Mutability::*; |
17 | 16 | pub use self::ItemEnum::*; |
18 | 17 | pub use self::Attribute::*; |
@@ -317,7 +316,7 @@ impl Item { |
317 | 316 | match self.inner { |
318 | 317 | StructItem(ref _struct) => Some(_struct.fields_stripped), |
319 | 318 | UnionItem(ref union) => Some(union.fields_stripped), |
320 | | - VariantItem(Variant { kind: StructVariant(ref vstruct)} ) => { |
| 319 | + VariantItem(Variant { kind: VariantKind::Struct(ref vstruct)} ) => { |
321 | 320 | Some(vstruct.fields_stripped) |
322 | 321 | }, |
323 | 322 | _ => None, |
@@ -2034,14 +2033,14 @@ impl Clean<Item> for doctree::Variant { |
2034 | 2033 | impl<'tcx> Clean<Item> for ty::VariantDefData<'tcx, 'static> { |
2035 | 2034 | fn clean(&self, cx: &DocContext) -> Item { |
2036 | 2035 | let kind = match self.kind { |
2037 | | - ty::VariantKind::Unit => CLikeVariant, |
| 2036 | + ty::VariantKind::Unit => VariantKind::CLike, |
2038 | 2037 | ty::VariantKind::Tuple => { |
2039 | | - TupleVariant( |
| 2038 | + VariantKind::Tuple( |
2040 | 2039 | self.fields.iter().map(|f| f.unsubst_ty().clean(cx)).collect() |
2041 | 2040 | ) |
2042 | 2041 | } |
2043 | 2042 | ty::VariantKind::Struct => { |
2044 | | - StructVariant(VariantStruct { |
| 2043 | + VariantKind::Struct(VariantStruct { |
2045 | 2044 | struct_type: doctree::Plain, |
2046 | 2045 | fields_stripped: false, |
2047 | 2046 | fields: self.fields.iter().map(|field| { |
@@ -2074,19 +2073,19 @@ impl<'tcx> Clean<Item> for ty::VariantDefData<'tcx, 'static> { |
2074 | 2073 |
|
2075 | 2074 | #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] |
2076 | 2075 | pub enum VariantKind { |
2077 | | - CLikeVariant, |
2078 | | - TupleVariant(Vec<Type>), |
2079 | | - StructVariant(VariantStruct), |
| 2076 | + CLike, |
| 2077 | + Tuple(Vec<Type>), |
| 2078 | + Struct(VariantStruct), |
2080 | 2079 | } |
2081 | 2080 |
|
2082 | 2081 | impl Clean<VariantKind> for hir::VariantData { |
2083 | 2082 | fn clean(&self, cx: &DocContext) -> VariantKind { |
2084 | 2083 | if self.is_struct() { |
2085 | | - StructVariant(self.clean(cx)) |
| 2084 | + VariantKind::Struct(self.clean(cx)) |
2086 | 2085 | } else if self.is_unit() { |
2087 | | - CLikeVariant |
| 2086 | + VariantKind::CLike |
2088 | 2087 | } else { |
2089 | | - TupleVariant(self.fields().iter().map(|x| x.ty.clean(cx)).collect()) |
| 2088 | + VariantKind::Tuple(self.fields().iter().map(|x| x.ty.clean(cx)).collect()) |
2090 | 2089 | } |
2091 | 2090 | } |
2092 | 2091 | } |
@@ -2552,8 +2551,7 @@ impl Clean<Vec<Item>> for doctree::Import { |
2552 | 2551 | if remaining.is_empty() { |
2553 | 2552 | return ret; |
2554 | 2553 | } |
2555 | | - (ret, Import::List(resolve_use_source(cx, p.clean(cx), self.id), |
2556 | | - remaining)) |
| 2554 | + (ret, Import::List(resolve_use_source(cx, p.clean(cx), self.id), remaining)) |
2557 | 2555 | } |
2558 | 2556 | hir::ViewPathSimple(name, ref p) => { |
2559 | 2557 | if !denied { |
|
0 commit comments