Add comment explaining why we flush delayed bugs before codegen
This commit is contained in:
parent
8a96884981
commit
477846f491
@ -246,6 +246,8 @@ pub fn ongoing_codegen(&'tcx self) -> Result<&Query<Box<dyn Any>>> {
|
|||||||
// Don't do code generation if there were any errors
|
// Don't do code generation if there were any errors
|
||||||
self.session().compile_status()?;
|
self.session().compile_status()?;
|
||||||
|
|
||||||
|
// If we have any delayed bugs, for example beacuse we created TyKind::Error earlier,
|
||||||
|
// it's likey that codegen will only cause more ICEs, obscuring the original problem
|
||||||
self.session().diagnostic().flush_delayed();
|
self.session().diagnostic().flush_delayed();
|
||||||
|
|
||||||
// Hook for UI tests.
|
// Hook for UI tests.
|
||||||
|
Loading…
Reference in New Issue
Block a user