1
Fork 0

Explain why an untranslatable_diagnostic occurs

This commit is contained in:
bjorn3 2024-12-12 13:46:16 +00:00
parent 981f625ba7
commit ea9e8c13dc

View file

@ -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");
@ -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;