diff options
| author | bors <bors@rust-lang.org> | 2022-04-13 21:04:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-13 21:04:19 +0000 |
| commit | 34a6c9f26e2ce32cad0d71f5e342365b09f4d12c (patch) | |
| tree | beb176a15b3870a559108e5859d608f5e3573ca7 /compiler/rustc_codegen_ssa | |
| parent | dc4bfcbdfff651c82eff4bdd311d28e54d1513c4 (diff) | |
| parent | 9bfe0e39e4214c9a76e6c38350286176fa73787a (diff) | |
| download | rust-34a6c9f26e2ce32cad0d71f5e342365b09f4d12c.tar.gz rust-34a6c9f26e2ce32cad0d71f5e342365b09f4d12c.zip | |
Auto merge of #95968 - davidtwco:translation-lazy-fallback, r=oli-obk
errors: lazily load fallback fluent bundle Addresses (hopefully) https://github.com/rust-lang/rust/pull/95667#issuecomment-1094794087. Loading the fallback bundle in compilation sessions that won't go on to emit any errors unnecessarily degrades compile time performance, so lazily create the Fluent bundle when it is first required. r? `@ghost` (just for perf initially)
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index 92c4ab7eb86..d5d21775f0a 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -1731,7 +1731,7 @@ impl Emitter for SharedEmitter { None } - fn fallback_fluent_bundle(&self) -> &Lrc<rustc_errors::FluentBundle> { + fn fallback_fluent_bundle(&self) -> &rustc_errors::FluentBundle { panic!("shared emitter attempted to translate a diagnostic"); } } |
