1
Fork 0

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:
Matthias Krüger 2022-08-03 22:29:27 +02:00 committed by GitHub
commit 0de7f756f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 22 deletions

View file

@ -14,8 +14,7 @@ use rustc_span::source_map::DUMMY_SP;
use rustc_trait_selection::infer::InferCtxtBuilderExt;
use rustc_trait_selection::traits::query::{CanonicalTyGoal, Fallible, NoSolution};
use rustc_trait_selection::traits::wf;
use rustc_trait_selection::traits::FulfillmentContext;
use rustc_trait_selection::traits::TraitEngine;
use rustc_trait_selection::traits::{TraitEngine, TraitEngineExt};
use smallvec::{smallvec, SmallVec};
pub(crate) fn provide(p: &mut Providers) {
@ -52,7 +51,7 @@ fn compute_implied_outlives_bounds<'tcx>(
let mut implied_bounds = vec![];
let mut fulfill_cx = FulfillmentContext::new();
let mut fulfill_cx = <dyn TraitEngine<'tcx>>::new(tcx);
while let Some(arg) = wf_args.pop() {
if !checked_wf_args.insert(arg) {