diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-03-03 22:25:18 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-07-19 14:10:07 +0000 |
| commit | 8eb5843a592afbee8ae5352828f8f0b74034b9e0 (patch) | |
| tree | a8f3bd019a4c355babb7e5b5ae0bc58c0b5007b3 /compiler/rustc_driver_impl/src/session_diagnostics.rs | |
| parent | 77e24f90f599070af2d8051ef9adad7fe528dd78 (diff) | |
| download | rust-8eb5843a592afbee8ae5352828f8f0b74034b9e0.tar.gz rust-8eb5843a592afbee8ae5352828f8f0b74034b9e0.zip | |
On nightly, dump ICE backtraces to disk
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.
Diffstat (limited to 'compiler/rustc_driver_impl/src/session_diagnostics.rs')
| -rw-r--r-- | compiler/rustc_driver_impl/src/session_diagnostics.rs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/session_diagnostics.rs b/compiler/rustc_driver_impl/src/session_diagnostics.rs index 638b368f702..f7f06b7d0f2 100644 --- a/compiler/rustc_driver_impl/src/session_diagnostics.rs +++ b/compiler/rustc_driver_impl/src/session_diagnostics.rs @@ -1,4 +1,4 @@ -use rustc_macros::Diagnostic; +use rustc_macros::{Diagnostic, Subdiagnostic}; #[derive(Diagnostic)] #[diag(driver_impl_rlink_unable_to_read)] @@ -57,6 +57,27 @@ pub(crate) struct IceVersion<'a> { } #[derive(Diagnostic)] +#[diag(driver_impl_ice_path)] +pub(crate) struct IcePath { + pub path: String, +} + +#[derive(Diagnostic)] +#[diag(driver_impl_ice_path_error)] +pub(crate) struct IcePathError { + pub path: String, + pub error: String, + #[subdiagnostic] + pub env_var: Option<IcePathErrorEnv>, +} + +#[derive(Subdiagnostic)] +#[note(driver_impl_ice_path_error_env)] +pub(crate) struct IcePathErrorEnv { + pub env_var: String, +} + +#[derive(Diagnostic)] #[diag(driver_impl_ice_flags)] pub(crate) struct IceFlags { pub flags: String, |
