diff options
| author | David Wood <david.wood@huawei.com> | 2022-04-12 09:34:40 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-04-13 02:44:59 +0100 |
| commit | 9bfe0e39e4214c9a76e6c38350286176fa73787a (patch) | |
| tree | d24caebeae01124af5e6ef78735dab042b3bc3ce /compiler/rustc_codegen_ssa/src/back | |
| parent | f6cef572d6d75a3b7dea5f496d3bd981986e94ca (diff) | |
| download | rust-9bfe0e39e4214c9a76e6c38350286176fa73787a.tar.gz rust-9bfe0e39e4214c9a76e6c38350286176fa73787a.zip | |
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>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -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"); } } |
