Skip to content

Commit f8ad4b5

Browse files
committed
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 <[email protected]>
1 parent 6eea2a8 commit f8ad4b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/parse/session.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ fn default_handler(
114114
let emitter = if hide_parse_errors {
115115
silent_emitter()
116116
} else {
117-
let fallback_bundle = rustc_errors::fallback_fluent_bundle();
117+
let fallback_bundle = rustc_errors::fallback_fluent_bundle()
118+
.expect("failed to load fallback fluent bundle");
118119
Box::new(EmitterWriter::stderr(
119120
color_cfg,
120121
Some(source_map.clone()),
122+
None,
121123
fallback_bundle,
122124
false,
123125
false,

0 commit comments

Comments
 (0)