@@ -82,7 +82,7 @@ pub type VarOrigins = IndexVec<RegionVid, RegionVariableOrigin>;
82
82
/// Describes constraints between the region variables and other
83
83
/// regions, as well as other conditions that must be verified, or
84
84
/// assumptions that can be made.
85
- #[ derive( Debug , Default ) ]
85
+ #[ derive( Debug , Default , Clone ) ]
86
86
pub struct RegionConstraintData < ' tcx > {
87
87
/// Constraints of the form `A <= B`, where either `A` or `B` can
88
88
/// be a region variable (or neither, as it happens).
@@ -142,7 +142,7 @@ pub enum Constraint<'tcx> {
142
142
/// outlive `RS`. Therefore verify that `R <= RS[i]` for some
143
143
/// `i`. Inference variables may be involved (but this verification
144
144
/// step doesn't influence inference).
145
- #[ derive( Debug ) ]
145
+ #[ derive( Debug , Clone ) ]
146
146
pub struct Verify < ' tcx > {
147
147
pub kind : GenericKind < ' tcx > ,
148
148
pub origin : SubregionOrigin < ' tcx > ,
@@ -159,7 +159,7 @@ pub enum GenericKind<'tcx> {
159
159
/// When we introduce a verification step, we wish to test that a
160
160
/// particular region (let's call it `'min`) meets some bound.
161
161
/// The bound is described the by the following grammar:
162
- #[ derive( Debug ) ]
162
+ #[ derive( Debug , Clone ) ]
163
163
pub enum VerifyBound < ' tcx > {
164
164
/// B = exists {R} --> some 'r in {R} must outlive 'min
165
165
///
@@ -288,6 +288,10 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
288
288
& self . var_origins
289
289
}
290
290
291
+ pub fn region_constraint_data ( & self ) -> & RegionConstraintData < ' tcx > {
292
+ & self . data
293
+ }
294
+
291
295
/// Once all the constraints have been gathered, extract out the final data.
292
296
///
293
297
/// Not legal during a snapshot.
0 commit comments