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)
This commit is contained in:
commit
34a6c9f26e
19 changed files with 94 additions and 81 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue