Thanks to visit codestin.com
Credit goes to github.com

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 committed Aug 3, 2024
commit ad90fa64cf43690147e2cf49ae5b4ca02da6f2f0
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,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.