@@ -991,14 +991,12 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
991
991
return None ;
992
992
}
993
993
994
- Some ( self . commit_if_ok ( |snapshot | {
994
+ Some ( self . commit_if_ok ( |_snapshot | {
995
995
let ( ty:: SubtypePredicate { a_is_expected, a, b } , _) =
996
996
self . replace_bound_vars_with_placeholders ( & predicate) ;
997
997
998
998
let ok = self . at ( cause, param_env) . sub_exp ( a_is_expected, a, b) ?;
999
999
1000
- self . leak_check ( false , snapshot) ?;
1001
-
1002
1000
Ok ( ok. unit ( ) )
1003
1001
} ) )
1004
1002
}
@@ -1008,14 +1006,13 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1008
1006
cause : & traits:: ObligationCause < ' tcx > ,
1009
1007
predicate : ty:: PolyRegionOutlivesPredicate < ' tcx > ,
1010
1008
) -> UnitResult < ' tcx > {
1011
- self . commit_if_ok ( |snapshot | {
1009
+ self . commit_if_ok ( |_snapshot | {
1012
1010
let ( ty:: OutlivesPredicate ( r_a, r_b) , _) =
1013
1011
self . replace_bound_vars_with_placeholders ( & predicate) ;
1014
1012
let origin = SubregionOrigin :: from_obligation_cause ( cause, || {
1015
1013
RelateRegionParamBound ( cause. span )
1016
1014
} ) ;
1017
1015
self . sub_regions ( origin, r_b, r_a) ; // `b : a` ==> `a <= b`
1018
- self . leak_check ( false , snapshot) ?;
1019
1016
Ok ( ( ) )
1020
1017
} )
1021
1018
}
0 commit comments