Replace tcx.mk_trait_ref
with ty::TraitRef::new
This commit is contained in:
parent
2d8c905e15
commit
46b01abbcd
41 changed files with 193 additions and 125 deletions
|
@ -261,11 +261,16 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
|||
(false, None, None, Some(span), String::new())
|
||||
};
|
||||
|
||||
let expected_trait_ref = self
|
||||
.cx
|
||||
.resolve_vars_if_possible(self.cx.tcx.mk_trait_ref(trait_def_id, expected_substs));
|
||||
let actual_trait_ref =
|
||||
self.cx.resolve_vars_if_possible(self.cx.tcx.mk_trait_ref(trait_def_id, actual_substs));
|
||||
let expected_trait_ref = self.cx.resolve_vars_if_possible(ty::TraitRef::new(
|
||||
self.cx.tcx,
|
||||
trait_def_id,
|
||||
expected_substs,
|
||||
));
|
||||
let actual_trait_ref = self.cx.resolve_vars_if_possible(ty::TraitRef::new(
|
||||
self.cx.tcx,
|
||||
trait_def_id,
|
||||
actual_substs,
|
||||
));
|
||||
|
||||
// Search the expected and actual trait references to see (a)
|
||||
// whether the sub/sup placeholders appear in them (sometimes
|
||||
|
|
|
@ -18,7 +18,7 @@ pub trait TraitEngine<'tcx>: 'tcx {
|
|||
def_id: DefId,
|
||||
cause: ObligationCause<'tcx>,
|
||||
) {
|
||||
let trait_ref = infcx.tcx.mk_trait_ref(def_id, [ty]);
|
||||
let trait_ref = ty::TraitRef::new(infcx.tcx, def_id, [ty]);
|
||||
self.register_predicate_obligation(
|
||||
infcx,
|
||||
Obligation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue