Skip to content

Commit e8984ea

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

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
@@ -898,7 +898,7 @@ fn create_and_seed_worklist(
898898
match tcx.def_kind(id) {
899899
DefKind::Impl { .. } => false,
900900
DefKind::AssocConst | DefKind::AssocFn => !matches!(tcx.associated_item(id).container, AssocItemContainer::ImplContainer),
901-
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()) || has_allow_dead_code_or_lang_attr(tcx, id).is_some(),
901+
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()),
902902
_ => true
903903
})
904904
.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)