Simplify a bunch of trait ref obligation creations

This commit is contained in:
Oli Scherer
2022-11-18 21:29:26 +00:00
committed by Santiago Pastorino
parent 08afabddac
commit 42cc8e8f4e
10 changed files with 17 additions and 40 deletions

View File

@@ -1784,7 +1784,7 @@ fn receiver_is_implemented<'tcx>(
let tcx = wfcx.tcx();
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(receiver_trait_def_id, [receiver_ty]));
let obligation = traits::Obligation::new(tcx, cause, wfcx.param_env, trait_ref.without_const());
let obligation = traits::Obligation::new(tcx, cause, wfcx.param_env, trait_ref);
if wfcx.infcx.predicate_must_hold_modulo_regions(&obligation) {
true