about summary refs log tree commit diff
path: root/compiler/rustc_driver/src
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2022-03-28 09:36:20 +0100
committerDavid Wood <david.wood@huawei.com>2022-04-05 07:01:02 +0100
commitd5119c5b9f1f71090d078e945ea6b5d39d08cffa (patch)
treed63f8049bf2692b7fe2d34bf9e86ec7c26af6fe3 /compiler/rustc_driver/src
parent7f91697b5035f8620df4de47057024c3539b55a6 (diff)
downloadrust-d5119c5b9f1f71090d078e945ea6b5d39d08cffa.tar.gz
rust-d5119c5b9f1f71090d078e945ea6b5d39d08cffa.zip
errors: implement sysroot/testing bundle loading
Extend loading of Fluent bundles so that bundles can be loaded from the
sysroot based on the language requested by the user, or using a nightly
flag.

Sysroot bundles are loaded from `$sysroot/share/locale/$locale/*.ftl`.

Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_driver/src')
-rw-r--r--compiler/rustc_driver/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index c95c59904d1..7fa3c1d17b0 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -1172,10 +1172,12 @@ static DEFAULT_HOOK: SyncLazy<Box<dyn Fn(&panic::PanicInfo<'_>) + Sync + Send +
 /// When `install_ice_hook` is called, this function will be called as the panic
 /// hook.
 pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
-    let fallback_bundle = rustc_errors::fallback_fluent_bundle();
+    let fallback_bundle =
+        rustc_errors::fallback_fluent_bundle().expect("failed to load fallback fluent bundle");
     let emitter = Box::new(rustc_errors::emitter::EmitterWriter::stderr(
         rustc_errors::ColorConfig::Auto,
         None,
+        None,
         fallback_bundle,
         false,
         false,