fix: use LocalDefId instead of HirId in trait res
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
parent
6b3cd03fdb
commit
7d2c1103d7
48 changed files with 265 additions and 280 deletions
|
@ -754,12 +754,9 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
|||
let ocx = ObligationCtxt::new(&infcx);
|
||||
|
||||
let predicates = tcx.predicates_of(callee).instantiate(tcx, substs);
|
||||
let hir_id = tcx
|
||||
.hir()
|
||||
.local_def_id_to_hir_id(self.body.source.def_id().expect_local());
|
||||
let cause = ObligationCause::new(
|
||||
terminator.source_info.span,
|
||||
hir_id,
|
||||
self.body.source.def_id().expect_local(),
|
||||
ObligationCauseCode::ItemObligation(callee),
|
||||
);
|
||||
let normalized_predicates = ocx.normalize(&cause, param_env, predicates);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue