We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6a6271 commit d15cdbfCopy full SHA for d15cdbf
compiler/rustc_passes/src/liveness.rs
@@ -1521,8 +1521,8 @@ impl<'tcx> Liveness<'_, 'tcx> {
1521
}
1522
1523
fn warn_about_unused_args(&self, body: &hir::Body<'_>, entry_ln: LiveNode) {
1524
- let fn_attrs = self.ir.tcx.hir().attrs(body.value.hir_id);
1525
- let is_intrinsic = fn_attrs.iter().any(|attr| attr.has_name(sym::rustc_intrinsic));
+ let is_intrinsic_with_no_body = self.ir.tcx.intrinsic(body.value.hir_id.owner.def_id)?.must_be_overridden();
+
1526
if is_intrinsic {
1527
let has_body = match &body.value.kind {
1528
rustc_hir::ExprKind::Block(block, _) => !block.stmts.is_empty() || block.expr.is_some(),
0 commit comments