Function rustc_driver_impl::install_ice_hook
source · pub fn install_ice_hook(
bug_report_url: &'static str,
extra_info: fn(_: &DiagCtxt)
) -> Arc<AtomicBool>Expand description
Installs a panic hook that will print the ICE message on unexpected panics.
The hook is intended to be useable even by external tools. You can pass a custom
bug_report_url, or report arbitrary info in extra_info. Note that extra_info is called in
a context where the thread is currently panicking, so it must not panic or the process will
abort.
If you have no extra info to report, pass the empty closure |_| () as the argument to
extra_info.
Returns a flag that can be set to disable the note for submitting a bug. This can be passed to
RunCompiler::set_using_internal_features to let macro expansion set it when encountering
internal features.
A custom rustc driver can skip calling this to set up a custom ICE hook.