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
|
@ -732,7 +732,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
|
|||
cx.tcx,
|
||||
param_env,
|
||||
ty,
|
||||
traits::ObligationCause::misc(item.span, item.hir_id()),
|
||||
traits::ObligationCause::misc(item.span, item.owner_id.def_id),
|
||||
)
|
||||
.is_ok()
|
||||
{
|
||||
|
|
|
@ -139,9 +139,10 @@ fn suggest_question_mark<'tcx>(
|
|||
|
||||
let ty = substs.type_at(0);
|
||||
let infcx = cx.tcx.infer_ctxt().build();
|
||||
let body_def_id = cx.tcx.hir().body_owner_def_id(body_id);
|
||||
let cause = ObligationCause::new(
|
||||
span,
|
||||
body_id.hir_id,
|
||||
body_def_id,
|
||||
rustc_infer::traits::ObligationCauseCode::MiscObligation,
|
||||
);
|
||||
let errors = rustc_trait_selection::traits::fully_solve_bound(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue