Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Rollup merge of #126315 - mu001999-contrib:fix/126289, r=petr…
…ochenkov"

This reverts commit 977c5fd, reversing
changes made to 24c94f0.
  • Loading branch information
compiler-errors authored and pietroalbini committed Aug 4, 2024
commit d45312d7f3792e738aa3053d46b393fc7765c3af
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ fn create_and_seed_worklist(
match tcx.def_kind(id) {
DefKind::Impl { .. } => false,
DefKind::AssocConst | DefKind::AssocFn => !matches!(tcx.associated_item(id).container, AssocItemContainer::ImplContainer),
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()) || has_allow_dead_code_or_lang_attr(tcx, id).is_some(),
DefKind::Struct => struct_all_fields_are_public(tcx, id.to_def_id()),
_ => true
})
.map(|id| (id, ComesFromAllowExpect::No))
Expand Down
33 changes: 0 additions & 33 deletions tests/ui/lint/dead-code/allow-unconstructed-pub-struct.rs

This file was deleted.