Skip to content

Commit bad7d36

Browse files
committed
flush_delayed: add note about stashed diagnostics
1 parent b25b6ea commit bad7d36

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)