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:
Vincenzo Palazzo 2023-01-15 12:58:46 +01:00
parent 6b3cd03fdb
commit 7d2c1103d7
48 changed files with 265 additions and 280 deletions

View file

@ -8,6 +8,7 @@ mod project;
mod structural_impls;
pub mod util;
use hir::def_id::LocalDefId;
use rustc_hir as hir;
use rustc_middle::ty::error::{ExpectedFound, TypeError};
use rustc_middle::ty::{self, Const, ToPredicate, Ty, TyCtxt};
@ -146,7 +147,7 @@ impl<'tcx, O> Obligation<'tcx, O> {
pub fn misc(
tcx: TyCtxt<'tcx>,
span: Span,
body_id: hir::HirId,
body_id: LocalDefId,
param_env: ty::ParamEnv<'tcx>,
trait_ref: impl ToPredicate<'tcx, O>,
) -> Obligation<'tcx, O> {