From 58f107ab567a4cbf167151d0cc5dbe7fcf51762e Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 26 Jul 2022 04:43:04 +0000 Subject: Use TraitEngine in more places that don't specifically need FulfillmentCtxt::new_in_snapshot --- compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_const_eval') diff --git a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs index 29464cf8c4e..09bb00238d9 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs @@ -10,7 +10,7 @@ use rustc_middle::mir::*; use rustc_middle::ty::{self, subst::SubstsRef, AdtDef, Ty}; use rustc_span::DUMMY_SP; use rustc_trait_selection::traits::{ - self, FulfillmentContext, ImplSource, Obligation, ObligationCause, SelectionContext, + self, ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngineExt, }; use super::ConstCx; @@ -191,7 +191,7 @@ impl Qualif for NeedsNonConstDrop { // If we successfully found one, then select all of the predicates // implied by our const drop impl. - let mut fcx = FulfillmentContext::new(); + let mut fcx = >::new(cx.tcx); for nested in impl_src.nested_obligations() { fcx.register_predicate_obligation(&infcx, nested); } -- cgit 1.4.1-3-g733a5