diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-06 15:23:54 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-21 13:23:07 +0000 |
| commit | 41f1ed11c2ef656737af2b15a9f58e84421424bb (patch) | |
| tree | 055ce35f7dfa089023e64fbee100e50dfd2fae66 /compiler/rustc_driver_impl/src/session_diagnostics.rs | |
| parent | 7d3965e0cdc1614335e2c3d18234963bb0827160 (diff) | |
| download | rust-41f1ed11c2ef656737af2b15a9f58e84421424bb.tar.gz rust-41f1ed11c2ef656737af2b15a9f58e84421424bb.zip | |
Move some calls to before calling codegen_crate
`--emit mir`, `#[rustc_symbol_name]` and `#[rustc_def_path]` now run before codegen and thus work even if codegen fails. This can help with debugging.
Diffstat (limited to 'compiler/rustc_driver_impl/src/session_diagnostics.rs')
| -rw-r--r-- | compiler/rustc_driver_impl/src/session_diagnostics.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_driver_impl/src/session_diagnostics.rs b/compiler/rustc_driver_impl/src/session_diagnostics.rs index e06c56539d1..774221fd396 100644 --- a/compiler/rustc_driver_impl/src/session_diagnostics.rs +++ b/compiler/rustc_driver_impl/src/session_diagnostics.rs @@ -3,6 +3,12 @@ use std::error::Error; use rustc_macros::{Diagnostic, Subdiagnostic}; #[derive(Diagnostic)] +#[diag(driver_impl_cant_emit_mir)] +pub struct CantEmitMIR { + pub error: std::io::Error, +} + +#[derive(Diagnostic)] #[diag(driver_impl_rlink_unable_to_read)] pub(crate) struct RlinkUnableToRead { pub err: std::io::Error, |
