@@ -1052,7 +1052,7 @@ impl<'a, 'gcx, 'tcx> GenericPredicates<'tcx> {
10521052 }
10531053}
10541054
1055- #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1055+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , LocalDrop ) ]
10561056pub enum Predicate < ' tcx > {
10571057 /// Corresponds to `where Foo: Bar<A,B,C>`. `Foo` here would be
10581058 /// the `Self` type of the trait reference and `A`, `B`, and `C`
@@ -1097,10 +1097,7 @@ pub struct CratePredicatesMap<'tcx> {
10971097 /// For each struct with outlive bounds, maps to a vector of the
10981098 /// predicate of its outlive bounds. If an item has no outlives
10991099 /// 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 > ] > ,
11041101}
11051102
11061103impl < ' tcx > AsRef < Predicate < ' tcx > > for Predicate < ' tcx > {
@@ -1203,7 +1200,7 @@ impl<'a, 'gcx, 'tcx> Predicate<'tcx> {
12031200 }
12041201}
12051202
1206- #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1203+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , LocalDrop ) ]
12071204pub struct TraitPredicate < ' tcx > {
12081205 pub trait_ref : TraitRef < ' tcx >
12091206}
@@ -1231,7 +1228,8 @@ impl<'tcx> PolyTraitPredicate<'tcx> {
12311228 }
12321229}
12331230
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 ) ]
12351233pub struct OutlivesPredicate < A , B > ( pub A , pub B ) ; // `A: B`
12361234pub type PolyOutlivesPredicate < A , B > = ty:: Binder < OutlivesPredicate < A , B > > ;
12371235pub type RegionOutlivesPredicate < ' tcx > = OutlivesPredicate < ty:: Region < ' tcx > ,
@@ -1241,7 +1239,7 @@ pub type TypeOutlivesPredicate<'tcx> = OutlivesPredicate<Ty<'tcx>,
12411239pub type PolyRegionOutlivesPredicate < ' tcx > = ty:: Binder < RegionOutlivesPredicate < ' tcx > > ;
12421240pub type PolyTypeOutlivesPredicate < ' tcx > = ty:: Binder < TypeOutlivesPredicate < ' tcx > > ;
12431241
1244- #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable ) ]
1242+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable , LocalDrop ) ]
12451243pub struct SubtypePredicate < ' tcx > {
12461244 pub a_is_expected : bool ,
12471245 pub a : Ty < ' tcx > ,
@@ -1261,7 +1259,7 @@ pub type PolySubtypePredicate<'tcx> = ty::Binder<SubtypePredicate<'tcx>>;
12611259/// equality between arbitrary types. Processing an instance of
12621260/// Form #2 eventually yields one of these `ProjectionPredicate`
12631261/// instances to normalize the LHS.
1264- #[ derive( Copy , Clone , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
1262+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , LocalDrop ) ]
12651263pub struct ProjectionPredicate < ' tcx > {
12661264 pub projection_ty : ProjectionTy < ' tcx > ,
12671265 pub ty : Ty < ' tcx > ,
@@ -2477,7 +2475,8 @@ impl<'a, 'gcx, 'tcx> FieldDef {
24772475///
24782476/// You can get the environment type of a closure using
24792477/// `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 ) ]
24812480pub enum ClosureKind {
24822481 // Warning: Ordering is significant here! The ordering is chosen
24832482 // because the trait Fn is a subtrait of FnMut and so in turn, and
0 commit comments