errors: lazily load fallback fluent bundle
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. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
f6cef572d6
commit
9bfe0e39e4
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