diff options
| author | David Wood <david.wood@huawei.com> | 2022-03-28 09:36:20 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-04-05 07:01:02 +0100 |
| commit | 865386e9dcac24966ac09062e910482346cd40f4 (patch) | |
| tree | 4416215b57ee35d4f7ca96425a790733f5f78ae7 /src | |
| parent | 41d1340505d37058349ba016c9dc8c3d52f49bf3 (diff) | |
| download | rust-865386e9dcac24966ac09062e910482346cd40f4.tar.gz rust-865386e9dcac24966ac09062e910482346cd40f4.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 'src')
| -rw-r--r-- | src/driver.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/driver.rs b/src/driver.rs index bfce787af5e..f04535b2bea 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -165,10 +165,12 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { // Separate the output with an empty line eprintln!(); - 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, |
