Skip to content

Commit 477846f

Browse files
authored
Add comment explaining why we flush delayed bugs before codegen
1 parent 8a96884 commit 477846f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_interface/src/queries.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ impl<'tcx> Queries<'tcx> {
246246
// Don't do code generation if there were any errors
247247
self.session().compile_status()?;
248248

249+
// If we have any delayed bugs, for example beacuse we created TyKind::Error earlier,
250+
// it's likey that codegen will only cause more ICEs, obscuring the original problem
249251
self.session().diagnostic().flush_delayed();
250252

251253
// Hook for UI tests.

0 commit comments

Comments
 (0)