Skip to content

Commit

Permalink
Updated condition to use self.ir.tcx.hir().body_owner_def_id(body.id())
Browse files Browse the repository at this point in the history
  • Loading branch information
vayunbiyani committed Jan 23, 2025
1 parent ad1a677 commit a150414
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_passes/src/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,9 @@ impl<'tcx> Liveness<'_, 'tcx> {
}

fn warn_about_unused_args(&self, body: &hir::Body<'_>, entry_ln: LiveNode) {
if let Some(intrinsic) = self.ir.tcx.intrinsic(body.value.hir_id.owner.def_id) {
if let Some(intrinsic) =
self.ir.tcx.intrinsic(self.ir.tcx.hir().body_owner_def_id(body.id()))
{
if intrinsic.must_be_overridden {
return;
}
Expand Down

0 comments on commit a150414

Please sign in to comment.