Skip to content

Commit 2b1bd80

Browse files
committed
infer: Remove redundant commit_if_ok calls.
1 parent 1b7fb17 commit 2b1bd80

File tree

1 file changed

+3
-3
lines changed
  • src/librustc/middle/infer

1 file changed

+3
-3
lines changed

src/librustc/middle/infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ pub fn mk_eqty<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
454454
-> UnitResult<'tcx>
455455
{
456456
debug!("mk_eqty({:?} <: {:?})", a, b);
457-
cx.commit_if_ok(|_| cx.eq_types(a_is_expected, origin, a, b))
457+
cx.eq_types(a_is_expected, origin, a, b)
458458
}
459459

460460
pub fn mk_eq_trait_refs<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
@@ -466,7 +466,7 @@ pub fn mk_eq_trait_refs<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
466466
{
467467
debug!("mk_eq_trait_refs({:?} <: {:?})",
468468
a, b);
469-
cx.commit_if_ok(|_| cx.eq_trait_refs(a_is_expected, origin, a.clone(), b.clone()))
469+
cx.eq_trait_refs(a_is_expected, origin, a, b)
470470
}
471471

472472
pub fn mk_sub_poly_trait_refs<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
@@ -478,7 +478,7 @@ pub fn mk_sub_poly_trait_refs<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
478478
{
479479
debug!("mk_sub_poly_trait_refs({:?} <: {:?})",
480480
a, b);
481-
cx.commit_if_ok(|_| cx.sub_poly_trait_refs(a_is_expected, origin, a.clone(), b.clone()))
481+
cx.sub_poly_trait_refs(a_is_expected, origin, a, b)
482482
}
483483

484484
fn expected_found<T>(a_is_expected: bool,

0 commit comments

Comments
 (0)