@@ -991,14 +991,12 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
991991 return None ;
992992 }
993993
994- Some ( self . commit_if_ok ( |snapshot | {
994+ Some ( self . commit_if_ok ( |_snapshot | {
995995 let ( ty:: SubtypePredicate { a_is_expected, a, b } , _) =
996996 self . replace_bound_vars_with_placeholders ( & predicate) ;
997997
998998 let ok = self . at ( cause, param_env) . sub_exp ( a_is_expected, a, b) ?;
999999
1000- self . leak_check ( false , snapshot) ?;
1001-
10021000 Ok ( ok. unit ( ) )
10031001 } ) )
10041002 }
@@ -1008,14 +1006,13 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
10081006 cause : & traits:: ObligationCause < ' tcx > ,
10091007 predicate : ty:: PolyRegionOutlivesPredicate < ' tcx > ,
10101008 ) -> UnitResult < ' tcx > {
1011- self . commit_if_ok ( |snapshot | {
1009+ self . commit_if_ok ( |_snapshot | {
10121010 let ( ty:: OutlivesPredicate ( r_a, r_b) , _) =
10131011 self . replace_bound_vars_with_placeholders ( & predicate) ;
10141012 let origin = SubregionOrigin :: from_obligation_cause ( cause, || {
10151013 RelateRegionParamBound ( cause. span )
10161014 } ) ;
10171015 self . sub_regions ( origin, r_b, r_a) ; // `b : a` ==> `a <= b`
1018- self . leak_check ( false , snapshot) ?;
10191016 Ok ( ( ) )
10201017 } )
10211018 }
0 commit comments