Skip to content

Commit ad90fa6

Browse files
Revert "Rollup merge of #126315 - mu001999-contrib:fix/126289, r=petrochenkov"
This reverts commit 977c5fd, reversing changes made to 24c94f0.
1 parent d571104 commit ad90fa6

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

compiler/rustc_passes/src/dead.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ fn create_and_seed_worklist(
922922
match tcx.def_kind(id) {
923923
DefKind::Impl { .. } => false,
924924
DefKind::AssocConst | DefKind::AssocFn => !matches!(tcx.associated_item(id).container, AssocItemContainer::ImplContainer),
925-
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()) || has_allow_dead_code_or_lang_attr(tcx, id).is_some(),
925+
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()),
926926
_ => true
927927
})
928928
.map(|id| (id, ComesFromAllowExpect::No))

tests/ui/lint/dead-code/allow-unconstructed-pub-struct.rs

-33
This file was deleted.

0 commit comments

Comments
 (0)