diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-07 16:55:28 +0100 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-12 15:05:24 +0000 |
| commit | b54398e4ea9188b0ccf60105e15ea5f2ed723edd (patch) | |
| tree | ba92d091fb48f655cb8e30ee3dac86e849c0bda1 /compiler/rustc_error_messages | |
| parent | 57a4736e9f4b7e8089b2db60583607f3b550c862 (diff) | |
| download | rust-b54398e4ea9188b0ccf60105e15ea5f2ed723edd.tar.gz rust-b54398e4ea9188b0ccf60105e15ea5f2ed723edd.zip | |
Make opts.maybe_sysroot non-optional
build_session_options always uses materialize_sysroot anyway.
Diffstat (limited to 'compiler/rustc_error_messages')
| -rw-r--r-- | compiler/rustc_error_messages/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index 6d02d6370fc..56adc583ac4 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -107,7 +107,7 @@ impl From<Vec<FluentError>> for TranslationBundleError { /// (overriding any conflicting messages). #[instrument(level = "trace")] pub fn fluent_bundle( - mut user_provided_sysroot: Option<PathBuf>, + mut user_provided_sysroot: PathBuf, mut sysroot_candidates: Vec<PathBuf>, requested_locale: Option<LanguageIdentifier>, additional_ftl_path: Option<&Path>, @@ -142,7 +142,9 @@ pub fn fluent_bundle( // If the user requests the default locale then don't try to load anything. if let Some(requested_locale) = requested_locale { let mut found_resources = false; - for sysroot in user_provided_sysroot.iter_mut().chain(sysroot_candidates.iter_mut()) { + for sysroot in + Some(&mut user_provided_sysroot).into_iter().chain(sysroot_candidates.iter_mut()) + { sysroot.push("share"); sysroot.push("locale"); sysroot.push(requested_locale.to_string()); |
