about summary refs log tree commit diff
path: root/src/parse
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
commitf8ad4b5cf853b85bc4d8794bdf6ee3244935c123 (patch)
treea7936a6c7bf3a1463c6742526476a651c91bea70 /src/parse
parent6eea2a88c16d44dd6d81cdabcbf2c15ffa424fdc (diff)
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 'src/parse')
-rw-r--r--src/parse/session.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parse/session.rs b/src/parse/session.rs
index 4563dbf6c16..6967028d55f 100644
--- a/src/parse/session.rs
+++ b/src/parse/session.rs
@@ -114,10 +114,12 @@ fn default_handler(
     let emitter = if hide_parse_errors {
         silent_emitter()
     } else {
-        let fallback_bundle = rustc_errors::fallback_fluent_bundle();
+        let fallback_bundle = rustc_errors::fallback_fluent_bundle()
+            .expect("failed to load fallback fluent bundle");
         Box::new(EmitterWriter::stderr(
             color_cfg,
             Some(source_map.clone()),
+            None,
             fallback_bundle,
             false,
             false,