@@ -34,7 +34,7 @@ use {rustc_ast as ast, rustc_hir as hir};
34
34
pub ( crate ) use self :: ItemKind :: * ;
35
35
pub ( crate ) use self :: Type :: {
36
36
Array , BareFunction , BorrowedRef , DynTrait , Generic , ImplTrait , Infer , Primitive , QPath ,
37
- RawPointer , SelfTy , Slice , Tuple ,
37
+ RawPointer , SelfTy , Slice , Tuple , UnsafeBinder ,
38
38
} ;
39
39
use crate :: clean:: cfg:: Cfg ;
40
40
use crate :: clean:: clean_middle_path;
@@ -1503,6 +1503,8 @@ pub(crate) enum Type {
1503
1503
1504
1504
/// An `impl Trait`: `impl TraitA + TraitB + ...`
1505
1505
ImplTrait ( Vec < GenericBound > ) ,
1506
+
1507
+ UnsafeBinder ( Box < UnsafeBinderTy > ) ,
1506
1508
}
1507
1509
1508
1510
impl Type {
@@ -1695,7 +1697,7 @@ impl Type {
1695
1697
Type :: Pat ( ..) => PrimitiveType :: Pat ,
1696
1698
RawPointer ( ..) => PrimitiveType :: RawPointer ,
1697
1699
QPath ( box QPathData { ref self_type, .. } ) => return self_type. def_id ( cache) ,
1698
- Generic ( _) | SelfTy | Infer | ImplTrait ( _) => return None ,
1700
+ Generic ( _) | SelfTy | Infer | ImplTrait ( _) | UnsafeBinder ( _ ) => return None ,
1699
1701
} ;
1700
1702
Primitive ( t) . def_id ( cache)
1701
1703
}
@@ -2335,6 +2337,12 @@ pub(crate) struct BareFunctionDecl {
2335
2337
pub ( crate ) abi : ExternAbi ,
2336
2338
}
2337
2339
2340
+ #[ derive( Clone , PartialEq , Eq , Debug , Hash ) ]
2341
+ pub ( crate ) struct UnsafeBinderTy {
2342
+ pub ( crate ) generic_params : Vec < GenericParamDef > ,
2343
+ pub ( crate ) ty : Type ,
2344
+ }
2345
+
2338
2346
#[ derive( Clone , Debug ) ]
2339
2347
pub ( crate ) struct Static {
2340
2348
pub ( crate ) type_ : Box < Type > ,
0 commit comments