diff options
| author | Vincenzo Palazzo <vincenzopalazzodev@gmail.com> | 2023-01-15 12:58:46 +0100 |
|---|---|---|
| committer | Vincenzo Palazzo <vincenzopalazzodev@gmail.com> | 2023-01-23 11:42:18 +0000 |
| commit | 7d2c1103d7e6773db6fcef8f142d29f2004a4e3b (patch) | |
| tree | 947a6f13fa6a9e9d3e4f7fcaaec5c2d1dfb9fb26 /compiler/rustc_const_eval | |
| parent | 6b3cd03fdb285781c60f5962194719fdfd46d910 (diff) | |
| download | rust-7d2c1103d7e6773db6fcef8f142d29f2004a4e3b.tar.gz rust-7d2c1103d7e6773db6fcef8f142d29f2004a4e3b.zip | |
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>
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/check.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 79f1737e32b..cc40c2566d2 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -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); |
