1
Fork 0

Make TraitEngine::new use the right solver, add compare mode

This commit is contained in:
Michael Goulet 2023-05-31 01:21:38 +00:00
parent b637048a89
commit 3d4da98273
8 changed files with 49 additions and 32 deletions

View file

@ -1549,7 +1549,7 @@ pub(super) fn check_generator_obligations(tcx: TyCtxt<'_>, def_id: LocalDefId) {
.with_opaque_type_inference(DefiningAnchor::Bind(def_id))
.build();
let mut fulfillment_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
let mut fulfillment_cx = <dyn TraitEngine<'_>>::new(&infcx);
for (predicate, cause) in generator_interior_predicates {
let obligation = Obligation::new(tcx, cause.clone(), param_env, *predicate);
fulfillment_cx.register_predicate_obligation(&infcx, obligation);