Skip to content

Commit b1efed4

Browse files
committed
Avoid accessing HIR for RPITITs assoc type on mark_live_symbols
1 parent 34ca2dc commit b1efed4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_passes/src/dead.rs

+6
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
243243
continue;
244244
}
245245

246+
// Avoid accessing the HIR for the synthesized associated type generated for RPITITs.
247+
if self.tcx.opt_rpitit_info(id).is_some() {
248+
self.live_symbols.insert(id);
249+
continue;
250+
}
251+
246252
// in the case of tuple struct constructors we want to check the item, not the generated
247253
// tuple struct constructor function
248254
let id = self.struct_constructors.get(&id).copied().unwrap_or(id);

0 commit comments

Comments
 (0)