@@ -1052,7 +1052,7 @@ impl<'a, 'gcx, 'tcx> GenericPredicates<'tcx> {
1052
1052
}
1053
1053
}
1054
1054
1055
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1055
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , LocalDrop ) ]
1056
1056
pub enum Predicate < ' tcx > {
1057
1057
/// Corresponds to `where Foo: Bar<A,B,C>`. `Foo` here would be
1058
1058
/// the `Self` type of the trait reference and `A`, `B`, and `C`
@@ -1097,10 +1097,7 @@ pub struct CratePredicatesMap<'tcx> {
1097
1097
/// For each struct with outlive bounds, maps to a vector of the
1098
1098
/// predicate of its outlive bounds. If an item has no outlives
1099
1099
/// bounds, it will have no entry.
1100
- pub predicates : FxHashMap < DefId , Lrc < Vec < ty:: Predicate < ' tcx > > > > ,
1101
-
1102
- /// An empty vector, useful for cloning.
1103
- pub empty_predicate : Lrc < Vec < ty:: Predicate < ' tcx > > > ,
1100
+ pub predicates : FxHashMap < DefId , & ' tcx [ ty:: Predicate < ' tcx > ] > ,
1104
1101
}
1105
1102
1106
1103
impl < ' tcx > AsRef < Predicate < ' tcx > > for Predicate < ' tcx > {
@@ -1203,7 +1200,7 @@ impl<'a, 'gcx, 'tcx> Predicate<'tcx> {
1203
1200
}
1204
1201
}
1205
1202
1206
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1203
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , LocalDrop ) ]
1207
1204
pub struct TraitPredicate < ' tcx > {
1208
1205
pub trait_ref : TraitRef < ' tcx >
1209
1206
}
@@ -1231,7 +1228,8 @@ impl<'tcx> PolyTraitPredicate<'tcx> {
1231
1228
}
1232
1229
}
1233
1230
1234
- #[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , Debug , RustcEncodable , RustcDecodable ) ]
1231
+ #[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , LocalDrop ,
1232
+ Ord , Hash , Debug , RustcEncodable , RustcDecodable ) ]
1235
1233
pub struct OutlivesPredicate < A , B > ( pub A , pub B ) ; // `A: B`
1236
1234
pub type PolyOutlivesPredicate < A , B > = ty:: Binder < OutlivesPredicate < A , B > > ;
1237
1235
pub type RegionOutlivesPredicate < ' tcx > = OutlivesPredicate < ty:: Region < ' tcx > ,
@@ -1241,7 +1239,7 @@ pub type TypeOutlivesPredicate<'tcx> = OutlivesPredicate<Ty<'tcx>,
1241
1239
pub type PolyRegionOutlivesPredicate < ' tcx > = ty:: Binder < RegionOutlivesPredicate < ' tcx > > ;
1242
1240
pub type PolyTypeOutlivesPredicate < ' tcx > = ty:: Binder < TypeOutlivesPredicate < ' tcx > > ;
1243
1241
1244
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable ) ]
1242
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable , LocalDrop ) ]
1245
1243
pub struct SubtypePredicate < ' tcx > {
1246
1244
pub a_is_expected : bool ,
1247
1245
pub a : Ty < ' tcx > ,
@@ -1261,7 +1259,7 @@ pub type PolySubtypePredicate<'tcx> = ty::Binder<SubtypePredicate<'tcx>>;
1261
1259
/// equality between arbitrary types. Processing an instance of
1262
1260
/// Form #2 eventually yields one of these `ProjectionPredicate`
1263
1261
/// instances to normalize the LHS.
1264
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1262
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , LocalDrop ) ]
1265
1263
pub struct ProjectionPredicate < ' tcx > {
1266
1264
pub projection_ty : ProjectionTy < ' tcx > ,
1267
1265
pub ty : Ty < ' tcx > ,
@@ -2477,7 +2475,8 @@ impl<'a, 'gcx, 'tcx> FieldDef {
2477
2475
///
2478
2476
/// You can get the environment type of a closure using
2479
2477
/// `tcx.closure_env_ty()`.
2480
- #[ derive( Clone , Copy , PartialOrd , Ord , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable ) ]
2478
+ #[ derive( Clone , Copy , PartialOrd , Ord , PartialEq , LocalDrop ,
2479
+ Eq , Hash , Debug , RustcEncodable , RustcDecodable ) ]
2481
2480
pub enum ClosureKind {
2482
2481
// Warning: Ordering is significant here! The ordering is chosen
2483
2482
// because the trait Fn is a subtrait of FnMut and so in turn, and
0 commit comments