@@ -30,7 +30,7 @@ use {rustc_ast as ast, rustc_hir as hir};
3030
3131pub ( crate ) use self :: ItemKind :: * ;
3232pub ( crate ) use self :: Type :: {
33- Array , BareFunction , BorrowedRef , DynTrait , Generic , ImplTrait , Infer , Primitive , QPath ,
33+ Array , BareFunction , BorrowedRef , DynTrait , Field , Generic , ImplTrait , Infer , Primitive , QPath ,
3434 RawPointer , SelfTy , Slice , Tuple , UnsafeBinder ,
3535} ;
3636use crate :: clean:: cfg:: Cfg ;
@@ -1568,6 +1568,9 @@ pub(crate) enum Type {
15681568 ImplTrait ( Vec < GenericBound > ) ,
15691569
15701570 UnsafeBinder ( Box < UnsafeBinderTy > ) ,
1571+
1572+ /// Field representing type `field_of!(container, field_path)`
1573+ Field ( Box < Type > , Box < str > ) ,
15711574}
15721575
15731576impl Type {
@@ -1764,7 +1767,9 @@ impl Type {
17641767 Type :: Pat ( ..) => PrimitiveType :: Pat ,
17651768 RawPointer ( ..) => PrimitiveType :: RawPointer ,
17661769 QPath ( box QPathData { self_type, .. } ) => return self_type. def_id ( cache) ,
1767- Generic ( _) | SelfTy | Infer | ImplTrait ( _) | UnsafeBinder ( _) => return None ,
1770+ Field ( ..) | Generic ( _) | SelfTy | Infer | ImplTrait ( _) | UnsafeBinder ( _) => {
1771+ return None ;
1772+ }
17681773 } ;
17691774 Primitive ( t) . def_id ( cache)
17701775 }
0 commit comments