@@ -1483,7 +1483,9 @@ pub(crate) enum Type {
14831483 ///
14841484 /// This is mostly Rustdoc's version of [`hir::Path`].
14851485 /// It has to be different because Rustdoc's [`PathSegment`] can contain cleaned generics.
1486- Path { path : Path } ,
1486+ Path {
1487+ path : Path ,
1488+ } ,
14871489 /// A `dyn Trait` object: `dyn for<'a> Trait<'a> + Send + 'static`
14881490 DynTrait ( Vec < PolyTrait > , Option < Lifetime > ) ,
14891491 /// A type parameter.
@@ -1500,10 +1502,15 @@ pub(crate) enum Type {
15001502 ///
15011503 /// The `String` field is a stringified version of the array's length parameter.
15021504 Array ( Box < Type > , Box < str > ) ,
1505+ Pat ( Box < Type > , Box < str > ) ,
15031506 /// A raw pointer type: `*const i32`, `*mut i32`
15041507 RawPointer ( Mutability , Box < Type > ) ,
15051508 /// A reference type: `&i32`, `&'a mut Foo`
1506- BorrowedRef { lifetime : Option < Lifetime > , mutability : Mutability , type_ : Box < Type > } ,
1509+ BorrowedRef {
1510+ lifetime : Option < Lifetime > ,
1511+ mutability : Mutability ,
1512+ type_ : Box < Type > ,
1513+ } ,
15071514
15081515 /// A qualified path to an associated item: `<Type as Trait>::Name`
15091516 QPath ( Box < QPathData > ) ,
@@ -1700,6 +1707,7 @@ impl Type {
17001707 BareFunction ( ..) => PrimitiveType :: Fn ,
17011708 Slice ( ..) => PrimitiveType :: Slice ,
17021709 Array ( ..) => PrimitiveType :: Array ,
1710+ Type :: Pat ( ..) => PrimitiveType :: Pat ,
17031711 RawPointer ( ..) => PrimitiveType :: RawPointer ,
17041712 QPath ( box QPathData { ref self_type, .. } ) => return self_type. inner_def_id ( cache) ,
17051713 Generic ( _) | Infer | ImplTrait ( _) => return None ,
@@ -1753,6 +1761,7 @@ pub(crate) enum PrimitiveType {
17531761 Str ,
17541762 Slice ,
17551763 Array ,
1764+ Pat ,
17561765 Tuple ,
17571766 Unit ,
17581767 RawPointer ,
@@ -1907,6 +1916,7 @@ impl PrimitiveType {
19071916 Bool => sym:: bool,
19081917 Char => sym:: char,
19091918 Array => sym:: array,
1919+ Pat => sym:: pat,
19101920 Slice => sym:: slice,
19111921 Tuple => sym:: tuple,
19121922 Unit => sym:: unit,
0 commit comments