@@ -37,7 +37,7 @@ use {rustc_ast as ast, rustc_hir as hir};
37
37
pub ( crate ) use self :: ItemKind :: * ;
38
38
pub ( crate ) use self :: Type :: {
39
39
Array , BareFunction , BorrowedRef , DynTrait , Generic , ImplTrait , Infer , Primitive , QPath ,
40
- RawPointer , SelfTy , Slice , Tuple ,
40
+ RawPointer , SelfTy , Slice , Tuple , UnsafeBinder ,
41
41
} ;
42
42
use crate :: clean:: cfg:: Cfg ;
43
43
use crate :: clean:: clean_middle_path;
@@ -1507,6 +1507,8 @@ pub(crate) enum Type {
1507
1507
1508
1508
/// An `impl Trait`: `impl TraitA + TraitB + ...`
1509
1509
ImplTrait ( Vec < GenericBound > ) ,
1510
+
1511
+ UnsafeBinder ( Box < UnsafeBinderTy > ) ,
1510
1512
}
1511
1513
1512
1514
impl Type {
@@ -1699,7 +1701,7 @@ impl Type {
1699
1701
Type :: Pat ( ..) => PrimitiveType :: Pat ,
1700
1702
RawPointer ( ..) => PrimitiveType :: RawPointer ,
1701
1703
QPath ( box QPathData { ref self_type, .. } ) => return self_type. def_id ( cache) ,
1702
- Generic ( _) | SelfTy | Infer | ImplTrait ( _) => return None ,
1704
+ Generic ( _) | SelfTy | Infer | ImplTrait ( _) | UnsafeBinder ( _ ) => return None ,
1703
1705
} ;
1704
1706
Primitive ( t) . def_id ( cache)
1705
1707
}
@@ -2339,6 +2341,12 @@ pub(crate) struct BareFunctionDecl {
2339
2341
pub ( crate ) abi : Abi ,
2340
2342
}
2341
2343
2344
+ #[ derive( Clone , PartialEq , Eq , Debug , Hash ) ]
2345
+ pub ( crate ) struct UnsafeBinderTy {
2346
+ pub ( crate ) generic_params : Vec < GenericParamDef > ,
2347
+ pub ( crate ) ty : Type ,
2348
+ }
2349
+
2342
2350
#[ derive( Clone , Debug ) ]
2343
2351
pub ( crate ) struct Static {
2344
2352
pub ( crate ) type_ : Box < Type > ,
0 commit comments