Skip to content

Commit

Permalink
Revert "Rollup merge of rust-lang#126315 - mu001999-contrib:fix/12628…
Browse files Browse the repository at this point in the history
…9, r=petrochenkov"

This reverts commit 977c5fd, reversing
changes made to 24c94f0.
  • Loading branch information
compiler-errors committed Jul 30, 2024
1 parent 0a499d9 commit 27ed9bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,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.

0 comments on commit 27ed9bf

Please sign in to comment.