Skip to content

Commit 4387e4b

Browse files
committed
use TraitEngineExt to register obligations
1 parent 5b8cf49 commit 4387e4b

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+2
-4
lines changed

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub use self::ValuePairs::*;
88
use self::opaque_types::OpaqueTypeStorage;
99
pub(crate) use self::undo_log::{InferCtxtUndoLogs, Snapshot, UndoLog};
1010

11-
use crate::traits::{self, ObligationCause, PredicateObligations, TraitEngine};
11+
use crate::traits::{self, ObligationCause, PredicateObligations, TraitEngine, TraitEngineExt};
1212

1313
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1414
use rustc_data_structures::sync::Lrc;
@@ -618,9 +618,7 @@ impl<'tcx, T> InferOk<'tcx, T> {
618618
fulfill_cx: &mut dyn TraitEngine<'tcx>,
619619
) -> T {
620620
let InferOk { value, obligations } = self;
621-
for obligation in obligations {
622-
fulfill_cx.register_predicate_obligation(infcx, obligation);
623-
}
621+
fulfill_cx.register_predicate_obligations(infcx, obligations);
624622
value
625623
}
626624
}

0 commit comments

Comments
 (0)