Skip to content

Commit 6e5642f

Browse files
committed
Avoid accessing HIR for RPITITs assoc type on mark_live_symbols
1 parent 11a315a commit 6e5642f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_passes/src/dead.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
243243
continue;
244244
}
245245

246+
if self.tcx.opt_rpitit_info(id).is_some() {
247+
self.live_symbols.insert(id);
248+
continue;
249+
}
250+
246251
// in the case of tuple struct constructors we want to check the item, not the generated
247252
// tuple struct constructor function
248253
let id = self.struct_constructors.get(&id).copied().unwrap_or(id);

0 commit comments

Comments
 (0)