File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1521,18 +1521,12 @@ impl<'tcx> Liveness<'_, 'tcx> {
1521
1521
}
1522
1522
1523
1523
fn warn_about_unused_args ( & self , body : & hir:: Body < ' _ > , entry_ln : LiveNode ) {
1524
- let is_intrinsic_with_no_body = self . ir . tcx . intrinsic ( body. value . hir_id . owner . def_id ) ?. must_be_overridden ( ) ;
1525
-
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 ( ) ,
1529
- _ => false ,
1530
- } ;
1531
- if has_body {
1524
+ if let Some ( intrinsic) = self . ir . tcx . intrinsic ( body. value . hir_id . owner . def_id ) {
1525
+ if intrinsic. must_be_overridden {
1532
1526
return ;
1533
1527
}
1534
1528
}
1535
-
1529
+
1536
1530
for p in body. params {
1537
1531
self . check_unused_vars_in_pat (
1538
1532
p. pat ,
You can’t perform that action at this time.
0 commit comments