@@ -82,7 +82,7 @@ pub type VarOrigins = IndexVec<RegionVid, RegionVariableOrigin>;
8282/// Describes constraints between the region variables and other
8383/// regions, as well as other conditions that must be verified, or
8484/// assumptions that can be made.
85- #[ derive( Debug , Default ) ]
85+ #[ derive( Debug , Default , Clone ) ]
8686pub struct RegionConstraintData < ' tcx > {
8787 /// Constraints of the form `A <= B`, where either `A` or `B` can
8888 /// be a region variable (or neither, as it happens).
@@ -142,7 +142,7 @@ pub enum Constraint<'tcx> {
142142/// outlive `RS`. Therefore verify that `R <= RS[i]` for some
143143/// `i`. Inference variables may be involved (but this verification
144144/// step doesn't influence inference).
145- #[ derive( Debug ) ]
145+ #[ derive( Debug , Clone ) ]
146146pub struct Verify < ' tcx > {
147147 pub kind : GenericKind < ' tcx > ,
148148 pub origin : SubregionOrigin < ' tcx > ,
@@ -159,7 +159,7 @@ pub enum GenericKind<'tcx> {
159159/// When we introduce a verification step, we wish to test that a
160160/// particular region (let's call it `'min`) meets some bound.
161161/// The bound is described the by the following grammar:
162- #[ derive( Debug ) ]
162+ #[ derive( Debug , Clone ) ]
163163pub enum VerifyBound < ' tcx > {
164164 /// B = exists {R} --> some 'r in {R} must outlive 'min
165165 ///
@@ -288,6 +288,10 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
288288 & self . var_origins
289289 }
290290
291+ pub fn region_constraint_data ( & self ) -> & RegionConstraintData < ' tcx > {
292+ & self . data
293+ }
294+
291295 /// Once all the constraints have been gathered, extract out the final data.
292296 ///
293297 /// Not legal during a snapshot.
0 commit comments