Rollup merge of #99746 - compiler-errors:more-trait-engine, r=jackh726
Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot` Not sure if this change is worthwhile, but couldn't hurt re: chalkification r? types
This commit is contained in:
commit
0de7f756f0
11 changed files with 23 additions and 22 deletions
|
@ -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 = <dyn TraitEngine<'tcx>>::new(cx.tcx);
|
||||
for nested in impl_src.nested_obligations() {
|
||||
fcx.register_predicate_obligation(&infcx, nested);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue