@@ -45,9 +45,7 @@ use self::free_regions::RegionRelations;
45
45
use self :: lexical_region_resolve:: LexicalRegionResolutions ;
46
46
use self :: outlives:: env:: OutlivesEnvironment ;
47
47
use self :: region_constraints:: { GenericKind , RegionConstraintData , VarInfos , VerifyBound } ;
48
- use self :: region_constraints:: {
49
- RegionConstraintCollector , RegionConstraintStorage , RegionSnapshot ,
50
- } ;
48
+ use self :: region_constraints:: { RegionConstraintCollector , RegionConstraintStorage } ;
51
49
use self :: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
52
50
53
51
pub mod at;
@@ -705,17 +703,6 @@ impl<'tcx> InferOk<'tcx, ()> {
705
703
}
706
704
}
707
705
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
-
719
706
#[ must_use = "once you start a snapshot, you should always consume it" ]
720
707
pub struct CombinedSnapshot < ' a , ' tcx > {
721
708
undo_snapshot : Snapshot < ' tcx > ,
@@ -831,19 +818,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
831
818
result
832
819
}
833
820
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
-
847
821
fn start_snapshot ( & self ) -> CombinedSnapshot < ' a , ' tcx > {
848
822
debug ! ( "start_snapshot()" ) ;
849
823
@@ -926,19 +900,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
926
900
r
927
901
}
928
902
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
-
942
903
/// If `should_skip` is true, then execute `f` then unroll any bindings it creates.
943
904
pub fn probe_maybe_skip_leak_check < R , F > ( & self , should_skip : bool , f : F ) -> R
944
905
where
0 commit comments