Skip to content

Commit d29818c

Browse files
committedAug 3, 2024
Revert "Rollup merge of rust-lang#126315 - mu001999-contrib:fix/126289, r=petrochenkov"
This reverts commit 977c5fd, reversing changes made to 24c94f0.
1 parent 22da616 commit d29818c

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
@@ -923,7 +923,7 @@ fn create_and_seed_worklist(
923923
match tcx.def_kind(id) {
924924
DefKind::Impl { .. } => false,
925925
DefKind::AssocConst | DefKind::AssocFn => !matches!(tcx.associated_item(id).container, AssocItemContainer::ImplContainer),
926-
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()) || has_allow_dead_code_or_lang_attr(tcx, id).is_some(),
926+
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()),
927927
_ => true
928928
})
929929
.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)
Please sign in to comment.