diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-01-30 10:54:33 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-01-30 10:54:33 +0000 |
| commit | 48af3a96e6106e67d0518c329f769e669b6e363c (patch) | |
| tree | f6d485c2d72eb5183d314c8436d82505b0d97cb0 | |
| parent | d4585408dc28b7d03a38aa29a0394e9e7ef2de69 (diff) | |
| download | rust-48af3a96e6106e67d0518c329f769e669b6e363c.tar.gz | |
Consider `#[allow(dead_code)]` before lang items
| -rw-r--r-- | compiler/rustc_passes/src/dead.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/dead.rs b/compiler/rustc_passes/src/dead.rs index c061787c30d..83adfeb6b10 100644 --- a/compiler/rustc_passes/src/dead.rs +++ b/compiler/rustc_passes/src/dead.rs @@ -482,9 +482,9 @@ fn has_allow_dead_code_or_lang_attr(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool } } - has_lang_attr(tcx, def_id) + has_allow_dead_code(tcx, def_id) || has_used_like_attr(tcx, def_id) - || has_allow_dead_code(tcx, def_id) + || has_lang_attr(tcx, def_id) } // These check_* functions seeds items that |
