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> {
15211521 }
15221522
15231523 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 {
15321526 return ;
15331527 }
15341528 }
1535-
1529+
15361530 for p in body. params {
15371531 self . check_unused_vars_in_pat (
15381532 p. pat ,
You can’t perform that action at this time.
0 commit comments