@@ -45,9 +45,7 @@ use self::free_regions::RegionRelations;
4545use self :: lexical_region_resolve:: LexicalRegionResolutions ;
4646use self :: outlives:: env:: OutlivesEnvironment ;
4747use self :: region_constraints:: { GenericKind , RegionConstraintData , VarInfos , VerifyBound } ;
48- use self :: region_constraints:: {
49- RegionConstraintCollector , RegionConstraintStorage , RegionSnapshot ,
50- } ;
48+ use self :: region_constraints:: { RegionConstraintCollector , RegionConstraintStorage } ;
5149use self :: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
5250
5351pub mod at;
@@ -705,17 +703,6 @@ impl<'tcx> InferOk<'tcx, ()> {
705703 }
706704}
707705
708- /// Extends `CombinedSnapshot` by tracking which variables were added in the snapshot
709- #[ must_use = "once you start a snapshot, you should always consume it" ]
710- pub struct FudgeSnapshot < ' a , ' tcx > {
711- snapshot : CombinedSnapshot < ' a , ' tcx > ,
712- region_constraints_snapshot : RegionSnapshot ,
713- type_snapshot : type_variable:: Snapshot < ' tcx > ,
714- const_var_len : usize ,
715- int_var_len : usize ,
716- float_var_len : usize ,
717- }
718-
719706#[ must_use = "once you start a snapshot, you should always consume it" ]
720707pub struct CombinedSnapshot < ' a , ' tcx > {
721708 undo_snapshot : Snapshot < ' tcx > ,
@@ -831,19 +818,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
831818 result
832819 }
833820
834- fn start_fudge_snapshot ( & self ) -> FudgeSnapshot < ' a , ' tcx > {
835- let snapshot = self . start_snapshot ( ) ;
836- let mut inner = self . inner . borrow_mut ( ) ;
837- FudgeSnapshot {
838- snapshot,
839- type_snapshot : inner. type_variables ( ) . snapshot ( ) ,
840- const_var_len : inner. const_unification_table ( ) . len ( ) ,
841- int_var_len : inner. int_unification_table ( ) . len ( ) ,
842- float_var_len : inner. float_unification_table ( ) . len ( ) ,
843- region_constraints_snapshot : inner. unwrap_region_constraints ( ) . start_snapshot ( ) ,
844- }
845- }
846-
847821 fn start_snapshot ( & self ) -> CombinedSnapshot < ' a , ' tcx > {
848822 debug ! ( "start_snapshot()" ) ;
849823
@@ -926,19 +900,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
926900 r
927901 }
928902
929- /// Like `probe` but provides information about which variables were created in the snapshot,
930- /// allowing for inference fudging
931- pub fn probe_fudge < R , F > ( & self , f : F ) -> R
932- where
933- F : FnOnce ( & FudgeSnapshot < ' a , ' tcx > ) -> R ,
934- {
935- debug ! ( "probe()" ) ;
936- let snapshot = self . start_fudge_snapshot ( ) ;
937- let r = f ( & snapshot) ;
938- self . rollback_to ( "probe" , snapshot. snapshot ) ;
939- r
940- }
941-
942903 /// If `should_skip` is true, then execute `f` then unroll any bindings it creates.
943904 pub fn probe_maybe_skip_leak_check < R , F > ( & self , should_skip : bool , f : F ) -> R
944905 where
0 commit comments