Skip to content

Commit c97bfa9

Browse files
authored
Unrolled build for #149020
Rollup merge of #149020 - RalfJung:flush_delayed, r=nnethercote flush_delayed: add note about stashed diagnostics r? `@nnethercote` Is `emit_stashed_diagnostics` the right advice to give? The other option seems to be to call `finish_diagnostics`. That's what I ended up doing (for now) in rust-lang/miri#4702 because it best matches what happens during normal compilation.
2 parents f9e7961 + bad7d36 commit c97bfa9

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_errors/src

1 file changed

+4
-0
lines changed

compiler/rustc_errors/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,10 @@ impl<'a> DiagCtxtHandle<'a> {
12051205
std::mem::take(&mut self.inner.borrow_mut().fulfilled_expectations)
12061206
}
12071207

1208+
/// Trigger an ICE if there are any delayed bugs and no hard errors.
1209+
///
1210+
/// This will panic if there are any stashed diagnostics. You can call
1211+
/// `emit_stashed_diagnostics` to emit those before calling `flush_delayed`.
12081212
pub fn flush_delayed(&self) {
12091213
self.inner.borrow_mut().flush_delayed();
12101214
}

0 commit comments

Comments
 (0)