Skip to content

Commit b4de452

Browse files
committed
Mark the variant itself as a live symbol in struct case
1 parent 468e4c3 commit b4de452

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_passes/src/dead.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
239239
let index = self.typeck_results().field_index(pat.hir_id);
240240
self.insert_def_id(variant.fields[index].did);
241241
}
242+
self.check_def_id(variant.def_id);
242243
}
243244

244245
fn handle_tuple_field_pattern_match(

0 commit comments

Comments
 (0)