diff options
| author | Michael Goulet <michael@errs.io> | 2022-07-26 04:43:04 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-07-26 04:55:06 +0000 |
| commit | 58f107ab567a4cbf167151d0cc5dbe7fcf51762e (patch) | |
| tree | d8843e1ce44b49774e641d6566231f0141a23b3e /compiler/rustc_trait_selection/src/traits/codegen.rs | |
| parent | 6dbae3ad19309bb541d9e76638e6aa4b5449f29a (diff) | |
| download | rust-58f107ab567a4cbf167151d0cc5dbe7fcf51762e.tar.gz rust-58f107ab567a4cbf167151d0cc5dbe7fcf51762e.zip | |
Use TraitEngine in more places that don't specifically need FulfillmentCtxt::new_in_snapshot
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/codegen.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/codegen.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/codegen.rs b/compiler/rustc_trait_selection/src/traits/codegen.rs index 5fcaa52d417..f42f936c516 100644 --- a/compiler/rustc_trait_selection/src/traits/codegen.rs +++ b/compiler/rustc_trait_selection/src/traits/codegen.rs @@ -5,7 +5,7 @@ use crate::infer::{DefiningAnchor, TyCtxtInferExt}; use crate::traits::{ - FulfillmentContext, ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, + ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, TraitEngineExt, Unimplemented, }; use rustc_middle::traits::CodegenObligationError; @@ -55,7 +55,7 @@ pub fn codegen_fulfill_obligation<'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 = FulfillmentContext::new(); + let mut fulfill_cx = <dyn TraitEngine<'tcx>>::new(tcx); let impl_source = selection.map(|predicate| { fulfill_cx.register_predicate_obligation(&infcx, predicate); }); |
