Use TraitEngine in more places that don't specifically need FulfillmentCtxt::new_in_snapshot

This commit is contained in:
Michael Goulet 2022-07-26 04:43:04 +00:00
parent 6dbae3ad19
commit 58f107ab56
11 changed files with 23 additions and 22 deletions

View file

@ -205,7 +205,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
// At this point, we already have all of the bounds we need. FulfillmentContext is used
// to store all of the necessary region/lifetime bounds in the InferContext, as well as
// an additional sanity check.
let mut fulfill = FulfillmentContext::new();
let mut fulfill = <dyn TraitEngine<'tcx>>::new(tcx);
fulfill.register_bound(&infcx, full_env, ty, trait_did, ObligationCause::dummy());
let errors = fulfill.select_all_or_error(&infcx);