diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-13 11:28:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-13 11:28:35 +0100 |
| commit | ad23e9d705a42cefee332c1a5a0f405856968ddb (patch) | |
| tree | 1d031cfa17d6986a35878c166d8dda36431a233f /compiler/rustc_error_messages | |
| parent | 459d5b5807fff8c2065e14fd17ace408c92c37c6 (diff) | |
| parent | 1543256e6f5f8a46e5acbee7bcb39354ece10010 (diff) | |
| download | rust-ad23e9d705a42cefee332c1a5a0f405856968ddb.tar.gz rust-ad23e9d705a42cefee332c1a5a0f405856968ddb.zip | |
Rollup merge of #138404 - bjorn3:sysroot_handling_cleanup, r=petrochenkov,jieyouxu
Cleanup sysroot locating a bit All commits should preserve existing behavior.
Diffstat (limited to 'compiler/rustc_error_messages')
| -rw-r--r-- | compiler/rustc_error_messages/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index 066546ecf74..39e78ae8841 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -106,8 +106,8 @@ impl From<Vec<FluentError>> for TranslationBundleError { /// (overriding any conflicting messages). #[instrument(level = "trace")] pub fn fluent_bundle( - mut user_provided_sysroot: Option<PathBuf>, - mut sysroot_candidates: Vec<PathBuf>, + sysroot: PathBuf, + sysroot_candidates: Vec<PathBuf>, requested_locale: Option<LanguageIdentifier>, additional_ftl_path: Option<&Path>, with_directionality_markers: bool, @@ -141,7 +141,7 @@ 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 mut sysroot in Some(sysroot).into_iter().chain(sysroot_candidates.into_iter()) { sysroot.push("share"); sysroot.push("locale"); sysroot.push(requested_locale.to_string()); |
