Rollup merge of #135840 - vayunbiyani:omit_intrinsic_unused_param_warning, r=oli-obk
omit unused args warnings for intrinsics without body potential fix for https://github.com/rust-lang/rust/issues/135598
This commit is contained in:
commit
2460b280db
3 changed files with 28 additions and 14 deletions
|
@ -1522,6 +1522,14 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
}
|
||||
|
||||
fn warn_about_unused_args(&self, body: &hir::Body<'_>, entry_ln: LiveNode) {
|
||||
if let Some(intrinsic) =
|
||||
self.ir.tcx.intrinsic(self.ir.tcx.hir().body_owner_def_id(body.id()))
|
||||
{
|
||||
if intrinsic.must_be_overridden {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for p in body.params {
|
||||
self.check_unused_vars_in_pat(
|
||||
p.pat,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue