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.
This commit is contained in:
bjorn3
2025-02-06 15:23:54 +00:00
parent 7d3965e0cd
commit 41f1ed11c2
6 changed files with 24 additions and 25 deletions

View File

@@ -2,6 +2,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 {