1
Fork 0

adopt to building infcx

This commit is contained in:
Maybe Waffle 2022-10-07 18:21:32 +00:00
parent 5347c81924
commit 9d4edff1b0

View file

@ -159,7 +159,7 @@ fn suggest_question_mark<'tcx>(
}
let ty = substs.type_at(0);
let is_iterator = cx.tcx.infer_ctxt().enter(|infcx| {
let infcx = cx.tcx.infer_ctxt().build();
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
let cause = ObligationCause::new(
@ -180,7 +180,4 @@ fn suggest_question_mark<'tcx>(
let errors = fulfill_cx.select_all_or_error(&infcx);
errors.is_empty()
});
is_iterator
}