about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-14 03:55:47 +0000
committerbors <bors@rust-lang.org>2024-12-14 03:55:47 +0000
commita1740a9c3568e856f6aa12d83e008d38c9749d4b (patch)
tree9830a58a9a9a6f2b70c34a550e91e6fc80fe75e7 /compiler/rustc_interface/src
parent4a204bebdfd5cbc3e7edabf41cda3c3ff8b74917 (diff)
parent75e778991ec9d07bba422645c2a148829bf9d0f3 (diff)
downloadrust-a1740a9c3568e856f6aa12d83e008d38c9749d4b.tar.gz
rust-a1740a9c3568e856f6aa12d83e008d38c9749d4b.zip
Auto merge of #134292 - matthiaskrgr:rollup-3kbjocl, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #134181 (Tweak multispan rendering to reduce output length)
 - #134209 (validate `--skip` and `--exclude` paths)
 - #134231 (rustdoc-search: fix mismatched path when parent re-exported twice)
 - #134236 (crashes: more tests v2)
 - #134240 (Only dist `llvm-objcopy` if llvm tools are enabled)
 - #134244 (rustc_borrowck: Stop suggesting the invalid syntax `&mut raw const`)
 - #134251 (A bunch of cleanups (part 2))
 - #134256 (Use a more precise span in placeholder_type_error_diag)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/interface.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs
index 07ae24ee6d3..91f190c6a28 100644
--- a/compiler/rustc_interface/src/interface.rs
+++ b/compiler/rustc_interface/src/interface.rs
@@ -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;
@@ -479,7 +482,6 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
             let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
             if let Some(register_lints) = config.register_lints.as_deref() {
                 register_lints(&sess, &mut lint_store);
-                sess.registered_lints = true;
             }
             sess.lint_store = Some(Lrc::new(lint_store));