diff --git a/Cargo.lock b/Cargo.lock index a00c6c397962a..78f3b4bae7139 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1811,9 +1811,9 @@ dependencies = [ [[package]] name = "icu_list" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeeaf517689324395bed4767f7c65504f5455942ed4c14ee54c2087ca00b816e" +checksum = "5a5c625125085fac4bf9ad111888a90c6ab9dc7bcaec392ca79cab417f46e3fb" dependencies = [ "icu_provider", "regex-automata", @@ -1823,39 +1823,38 @@ dependencies = [ ] [[package]] -name = "icu_locale" -version = "2.2.0" +name = "icu_locale_core" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5a396343c7208121dc86e35623d3dfe19814a7613cfd14964994cdc9c9a2e26" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_locale_data", - "icu_provider", - "potential_utf", + "displaydoc", + "litemap", + "serde", "tinystr", + "writeable", "zerovec", ] [[package]] -name = "icu_locale_core" -version = "2.2.0" +name = "icu_locale_fallback" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +checksum = "251af8e57c9400e3eb58242fe5b8b1152b2a64fdf4cf632f923c38ccee6f2fa9" dependencies = [ - "displaydoc", - "litemap", - "serde", + "icu_locale_core", + "icu_locale_fallback_data", + "icu_provider", + "potential_utf", "tinystr", - "writeable", "zerovec", ] [[package]] -name = "icu_locale_data" -version = "2.2.0" +name = "icu_locale_fallback_data" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fdcc9ac77c6d74ff5cf6e65ef3181d6af32003b16fce3a77fb451d2f695993" +checksum = "decf2a22ec8fa68f1a0c1129a3f8583f8f8bc24e8b9ccbe98ead99f62a4dc3a8" [[package]] name = "icu_normalizer" @@ -1899,9 +1898,9 @@ checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +checksum = "92a7ed671a6aad807a8651a2e1782a6598fda9ce5185dd8158549e95a91c6428" dependencies = [ "displaydoc", "icu_locale_core", @@ -3696,7 +3695,7 @@ name = "rustc_baked_icu_data" version = "0.0.0" dependencies = [ "icu_list", - "icu_locale", + "icu_locale_fallback", "icu_provider", "zerovec", ] @@ -3961,7 +3960,7 @@ version = "0.0.0" dependencies = [ "fluent-bundle", "icu_list", - "icu_locale", + "icu_locale_core", "intl-memoizer", "rustc_baked_icu_data", "rustc_data_structures", @@ -5688,9 +5687,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" dependencies = [ "displaydoc", "serde_core", @@ -6830,9 +6829,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "x" @@ -6859,9 +6858,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -6923,9 +6922,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" dependencies = [ "displaydoc", "yoke", @@ -6935,9 +6934,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8" dependencies = [ "serde", "yoke", @@ -6947,13 +6946,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 3.0.3", ] [[package]] diff --git a/compiler/rustc_baked_icu_data/Cargo.toml b/compiler/rustc_baked_icu_data/Cargo.toml index c3887e4580d71..072084e8ff061 100644 --- a/compiler/rustc_baked_icu_data/Cargo.toml +++ b/compiler/rustc_baked_icu_data/Cargo.toml @@ -5,8 +5,8 @@ edition = "2024" [dependencies] # tidy-alphabetical-start -icu_list = { version = "2.2", default-features = false } -icu_locale = { version = "2.2", default-features = false, features = ["compiled_data"] } -icu_provider = { version = "2.2", features = ["baked", "sync"] } +icu_list = { version = "2.3", default-features = false } +icu_locale_fallback = { version = "2.3", default-features = false, features = ["compiled_data"] } +icu_provider = { version = "2.3", features = ["baked", "sync"] } zerovec = "0.11.0" # tidy-alphabetical-end diff --git a/compiler/rustc_baked_icu_data/src/data/list_and_v1.rs.data b/compiler/rustc_baked_icu_data/src/data/list_and_v1.rs.data index e89e10d20de7b..6a0d2bf61e49e 100644 --- a/compiler/rustc_baked_icu_data/src/data/list_and_v1.rs.data +++ b/compiler/rustc_baked_icu_data/src/data/list_and_v1.rs.data @@ -11,7 +11,7 @@ /// /// This macro requires the following crates: /// * `icu_list` -/// * `icu_locale/compiled_data` +/// * `icu_locale_fallback/compiled_data` /// * `icu_provider` /// * `icu_provider/baked` /// * `zerovec` @@ -19,9 +19,9 @@ #[macro_export] macro_rules! __impl_list_and_v1 { ($ provider : ty) => { - #[clippy::msrv = "1.86"] + #[clippy::msrv = "1.88"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.86"] + #[clippy::msrv = "1.88"] impl $provider { const DATA_LIST_AND_V1: icu_provider::baked::zerotrie::Data = { const TRIE: icu_provider::baked::zerotrie::ZeroTrieSimpleAscii<&'static [u8]> = icu_provider::baked::zerotrie::ZeroTrieSimpleAscii { store: b"\xC8efijprtz\x18#.9DOZ\xC2ns\n\x1E\xC3NSW\x01\x02\x80\x85\x8A\x1E\xC3NSW\x01\x02\x81\x81\x81r\x1E\xC3NSW\x01\x02\x80\x86\x86t\x1E\xC3NSW\x01\x02\x82\x82\x82a\x1E\xC3NSW\x01\x02\x83\x83\x83t\x1E\xC3NSW\x01\x02\x80\x82\x82u\x1E\xC3NSW\x01\x02\x80\x87\x87r\x1E\xC3NSW\x01\x02\x80\x88\x88h\xC2\x1E-\t\xC3NSW\x01\x02\x83\x89\x89Han\xC2st\n\x1E\xC3NSW\x01\x02\x83\x89\x89\x1E\xC3NSW\x01\x02\x84\x89\x89" }; @@ -29,14 +29,14 @@ macro_rules! __impl_list_and_v1 { unsafe { icu_provider::baked::zerotrie::Data::from_trie_and_values_unchecked(TRIE, VALUES) } }; } - #[clippy::msrv = "1.86"] + #[clippy::msrv = "1.88"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { let mut metadata = icu_provider::DataResponseMetadata::default(); let payload = if let Some(payload) = icu_provider::baked::DataStore::get(&Self::DATA_LIST_AND_V1, req.id, req.metadata.attributes_prefix_match) { payload } else { - const FALLBACKER: icu_locale::fallback::LocaleFallbackerWithConfig<'static> = icu_locale::fallback::LocaleFallbacker::new().for_config(::INFO.fallback_config); + const FALLBACKER: icu_locale_fallback::LocaleFallbackerWithConfig<'static> = icu_locale_fallback::LocaleFallbacker::new().for_config(::INFO.fallback_config); let mut fallback_iterator = FALLBACKER.fallback_for(req.id.locale.clone()); loop { if let Some(payload) = icu_provider::baked::DataStore::get(&Self::DATA_LIST_AND_V1, icu_provider::DataIdentifierBorrowed::for_marker_attributes_and_locale(req.id.marker_attributes, fallback_iterator.get()), req.metadata.attributes_prefix_match) { @@ -55,7 +55,7 @@ macro_rules! __impl_list_and_v1 { }; ($ provider : ty , ITER) => { __impl_list_and_v1!($provider); - #[clippy::msrv = "1.86"] + #[clippy::msrv = "1.88"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(icu_provider::baked::DataStore::iter(&Self::DATA_LIST_AND_V1).collect()) diff --git a/compiler/rustc_baked_icu_data/src/data/mod.rs b/compiler/rustc_baked_icu_data/src/data/mod.rs index fd43456b9e619..61d39d153db68 100644 --- a/compiler/rustc_baked_icu_data/src/data/mod.rs +++ b/compiler/rustc_baked_icu_data/src/data/mod.rs @@ -15,7 +15,7 @@ include!("list_and_v1.rs.data"); #[macro_export] macro_rules! __make_provider { ($ name : ty) => { - #[clippy::msrv = "1.86"] + #[clippy::msrv = "1.88"] impl $name { #[allow(dead_code)] pub(crate) const MUST_USE_MAKE_PROVIDER_MACRO: () = (); @@ -27,7 +27,7 @@ macro_rules! __make_provider { pub use __make_provider as make_provider; /// This macro requires the following crates: /// * `icu_list` -/// * `icu_locale/compiled_data` +/// * `icu_locale_fallback/compiled_data` /// * `icu_provider` /// * `icu_provider/baked` /// * `zerovec` diff --git a/compiler/rustc_baked_icu_data/src/lib.rs b/compiler/rustc_baked_icu_data/src/lib.rs index 75fe473ef999a..1116990e7f033 100644 --- a/compiler/rustc_baked_icu_data/src/lib.rs +++ b/compiler/rustc_baked_icu_data/src/lib.rs @@ -37,14 +37,17 @@ pub const fn baked_data_provider() -> BakedDataProvider { } pub mod supported_locales { - pub const EN: icu_locale::Locale = icu_locale::locale!("en"); - pub const ES: icu_locale::Locale = icu_locale::locale!("es"); - pub const FR: icu_locale::Locale = icu_locale::locale!("fr"); - pub const IT: icu_locale::Locale = icu_locale::locale!("it"); - pub const JA: icu_locale::Locale = icu_locale::locale!("ja"); - pub const PT: icu_locale::Locale = icu_locale::locale!("pt"); - pub const RU: icu_locale::Locale = icu_locale::locale!("ru"); - pub const TR: icu_locale::Locale = icu_locale::locale!("tr"); - pub const ZH_HANS: icu_locale::Locale = icu_locale::locale!("zh-Hans"); - pub const ZH_HANT: icu_locale::Locale = icu_locale::locale!("zh-Hant"); + use icu_locale_core::{Locale, locale}; + use icu_provider::prelude::*; + + pub const EN: Locale = locale!("en"); + pub const ES: Locale = locale!("es"); + pub const FR: Locale = locale!("fr"); + pub const IT: Locale = locale!("it"); + pub const JA: Locale = locale!("ja"); + pub const PT: Locale = locale!("pt"); + pub const RU: Locale = locale!("ru"); + pub const TR: Locale = locale!("tr"); + pub const ZH_HANS: Locale = locale!("zh-Hans"); + pub const ZH_HANT: Locale = locale!("zh-Hant"); } diff --git a/compiler/rustc_error_messages/Cargo.toml b/compiler/rustc_error_messages/Cargo.toml index 50f0b265527fe..02851a2255a87 100644 --- a/compiler/rustc_error_messages/Cargo.toml +++ b/compiler/rustc_error_messages/Cargo.toml @@ -6,8 +6,8 @@ edition = "2024" [dependencies] # tidy-alphabetical-start fluent-bundle = "0.16" -icu_list = { version = "2.2", default-features = false, features = ["alloc"] } -icu_locale = { version = "2.2", default-features = false } +icu_list = { version = "2.3", default-features = false, features = ["alloc"] } +icu_locale_core = { version = "2.3", default-features = false } intl-memoizer = "0.5.1" rustc_baked_icu_data = { path = "../rustc_baked_icu_data" } rustc_data_structures = { path = "../rustc_data_structures" } diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index 7f7e6f2efb65d..7c4e9fb649217 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -213,8 +213,8 @@ impl From> for MultiSpan { } } -fn icu_locale_from_unic_langid(lang: LanguageIdentifier) -> Option { - icu_locale::Locale::try_from_str(&lang.to_string()).ok() +fn icu_locale_from_unic_langid(lang: LanguageIdentifier) -> Option { + icu_locale_core::Locale::try_from_str(&lang.to_string()).ok() } pub fn fluent_value_from_str_list_sep_by_and(l: Vec>) -> FluentValue<'_> { diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 721dcb851035a..8d9262f9f9221 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -351,11 +351,10 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[ "gimli", "gsgdt", "hashbrown", - "icu_collections", "icu_list", - "icu_locale", "icu_locale_core", - "icu_locale_data", + "icu_locale_fallback", + "icu_locale_fallback_data", "icu_provider", "ident_case", "indexmap", @@ -482,7 +481,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[ "unicode-script", "unicode-security", "unicode-width", - "utf8_iter", "utf8parse", "valuable", "version_check",