Skip to content

Commit

Permalink
On nightly, dump ICE backtraces to disk
Browse files Browse the repository at this point in the history
Implement rust-lang/compiler-team#578.

When an ICE is encountered on nightly releases, the new rustc panic
handler will also write the contents of the backtrace to disk. If any
`delay_span_bug`s are encountered, their backtrace is also added to the
file. The platform and rustc version will also be collected.
  • Loading branch information
estebank committed Jul 19, 2023
1 parent 78331ee commit 6013a80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parse/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ fn default_handler(
ignore_path_set,
can_reset,
}),
None,
)
}

Expand Down Expand Up @@ -233,7 +234,7 @@ impl ParseSess {
}

pub(crate) fn set_silent_emitter(&mut self) {
self.parse_sess.span_diagnostic = Handler::with_emitter(true, None, silent_emitter());
self.parse_sess.span_diagnostic = Handler::with_emitter(true, None, silent_emitter(), None);
}

pub(crate) fn span_to_filename(&self, span: Span) -> FileName {
Expand Down

0 comments on commit 6013a80

Please sign in to comment.