Skip to content

Commit a150414

Browse files
committed
Updated condition to use self.ir.tcx.hir().body_owner_def_id(body.id())
1 parent ad1a677 commit a150414

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_passes/src/liveness.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,9 @@ impl<'tcx> Liveness<'_, 'tcx> {
15211521
}
15221522

15231523
fn warn_about_unused_args(&self, body: &hir::Body<'_>, entry_ln: LiveNode) {
1524-
if let Some(intrinsic) = self.ir.tcx.intrinsic(body.value.hir_id.owner.def_id) {
1524+
if let Some(intrinsic) =
1525+
self.ir.tcx.intrinsic(self.ir.tcx.hir().body_owner_def_id(body.id()))
1526+
{
15251527
if intrinsic.must_be_overridden {
15261528
return;
15271529
}

0 commit comments

Comments
 (0)