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

@ -55,7 +55,7 @@ pub fn codegen_select_candidate<'tcx>(
// Currently, we use a fulfillment context to completely resolve
// all nested obligations. This is because they can inform the
// inference of the impl's type parameters.
let mut fulfill_cx = <dyn TraitEngine<'tcx>>::new(tcx);
let mut fulfill_cx = <dyn TraitEngine<'tcx>>::new(&infcx);
let impl_source = selection.map(|predicate| {
fulfill_cx.register_predicate_obligation(&infcx, predicate);
});