Skip to content

Commit 48af3a9

Browse files
committed
Consider #[allow(dead_code)] before lang items
1 parent d458540 commit 48af3a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_passes/src/dead.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,9 @@ fn has_allow_dead_code_or_lang_attr(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool
482482
}
483483
}
484484

485-
has_lang_attr(tcx, def_id)
485+
has_allow_dead_code(tcx, def_id)
486486
|| has_used_like_attr(tcx, def_id)
487-
|| has_allow_dead_code(tcx, def_id)
487+
|| has_lang_attr(tcx, def_id)
488488
}
489489

490490
// These check_* functions seeds items that

0 commit comments

Comments
 (0)