Skip to content

Commit

Permalink
Explain why an untranslatable_diagnostic occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Dec 13, 2024
1 parent ab3051b commit fe9a2ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compiler/rustc_interface/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ pub(crate) fn initialize_checked_jobserver(early_dcx: &EarlyDiagCtxt) {

// JUSTIFICATION: before session exists, only config
#[allow(rustc::bad_opt_access)]
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Send) -> R {
trace!("run_compiler");

Expand Down Expand Up @@ -425,7 +424,11 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
config.opts.unstable_opts.translate_directionality_markers,
) {
Ok(bundle) => bundle,
Err(e) => early_dcx.early_fatal(format!("failed to load fluent bundle: {e}")),
Err(e) => {
// We can't translate anything if we failed to load translations
#[allow(rustc::untranslatable_diagnostic)]
early_dcx.early_fatal(format!("failed to load fluent bundle: {e}"))
}
};

let mut locale_resources = config.locale_resources;
Expand Down

0 comments on commit fe9a2ab

Please sign in to comment.