Skip to content

Commit aa1308a

Browse files
Use marker names for baked output (#5061)
In Rust code we want to use Rust identifiers where possible. This aligns macro and singleton names with the marker names. All interesting changes are in the second commit.
1 parent ec90d83 commit aa1308a

File tree

1,260 files changed

+157443
-157406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,260 files changed

+157443
-157406
lines changed

Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/calendar/src/chinese.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl Chinese {
154154
pub const fn new() -> Self {
155155
Self {
156156
data: Some(DataPayload::from_static_ref(
157-
crate::provider::Baked::SINGLETON_CALENDAR_CHINESECACHE_V1,
157+
crate::provider::Baked::SINGLETON_CHINESE_CACHE_V1_MARKER,
158158
)),
159159
}
160160
}

components/calendar/src/dangi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl Dangi {
147147
pub const fn new() -> Self {
148148
Self {
149149
data: Some(DataPayload::from_static_ref(
150-
crate::provider::Baked::SINGLETON_CALENDAR_DANGICACHE_V1,
150+
crate::provider::Baked::SINGLETON_DANGI_CACHE_V1_MARKER,
151151
)),
152152
}
153153
}

components/calendar/src/islamic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl IslamicObservational {
122122
pub const fn new() -> Self {
123123
Self {
124124
data: Some(DataPayload::from_static_ref(
125-
crate::provider::Baked::SINGLETON_CALENDAR_ISLAMICOBSERVATIONALCACHE_V1,
125+
crate::provider::Baked::SINGLETON_ISLAMIC_OBSERVATIONAL_CACHE_V1_MARKER,
126126
)),
127127
}
128128
}
@@ -169,7 +169,7 @@ impl IslamicUmmAlQura {
169169
pub const fn new() -> Self {
170170
Self {
171171
data: Some(DataPayload::from_static_ref(
172-
crate::provider::Baked::SINGLETON_CALENDAR_ISLAMICUMMALQURACACHE_V1,
172+
crate::provider::Baked::SINGLETON_ISLAMIC_UMM_AL_QURA_CACHE_V1_MARKER,
173173
)),
174174
}
175175
}

components/calendar/src/japanese.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Japanese {
124124
pub const fn new() -> Self {
125125
Self {
126126
eras: DataPayload::from_static_ref(
127-
crate::provider::Baked::SINGLETON_CALENDAR_JAPANESE_V1,
127+
crate::provider::Baked::SINGLETON_JAPANESE_ERAS_V1_MARKER,
128128
),
129129
}
130130
}
@@ -182,7 +182,7 @@ impl JapaneseExtended {
182182
pub const fn new() -> Self {
183183
Self(Japanese {
184184
eras: DataPayload::from_static_ref(
185-
crate::provider::Baked::SINGLETON_CALENDAR_JAPANEXT_V1,
185+
crate::provider::Baked::SINGLETON_JAPANESE_EXTENDED_ERAS_V1_MARKER,
186186
),
187187
})
188188
}

components/calendar/src/provider.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ const _: () = {
4646
pub use icu_calendar_data::icu_locale as locale;
4747
}
4848
make_provider!(Baked);
49-
impl_calendar_chinesecache_v1!(Baked);
50-
impl_calendar_dangicache_v1!(Baked);
51-
impl_calendar_islamicobservationalcache_v1!(Baked);
52-
impl_calendar_islamicummalquracache_v1!(Baked);
53-
impl_calendar_japanese_v1!(Baked);
54-
impl_calendar_japanext_v1!(Baked);
55-
impl_datetime_week_data_v1!(Baked);
56-
impl_datetime_week_data_v2!(Baked);
49+
impl_chinese_cache_v1_marker!(Baked);
50+
impl_dangi_cache_v1_marker!(Baked);
51+
impl_islamic_observational_cache_v1_marker!(Baked);
52+
impl_islamic_umm_al_qura_cache_v1_marker!(Baked);
53+
impl_japanese_eras_v1_marker!(Baked);
54+
impl_japanese_extended_eras_v1_marker!(Baked);
55+
impl_week_data_v1_marker!(Baked);
56+
impl_week_data_v2_marker!(Baked);
5757
};
5858

5959
#[cfg(feature = "datagen")]

components/casemap/src/casemapper.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ impl CaseMapper {
7474
#[cfg(feature = "compiled_data")]
7575
pub const fn new() -> Self {
7676
Self {
77-
data: DataPayload::from_static_ref(crate::provider::Baked::SINGLETON_PROPS_CASEMAP_V1),
77+
data: DataPayload::from_static_ref(
78+
crate::provider::Baked::SINGLETON_CASE_MAP_V1_MARKER,
79+
),
7880
}
7981
}
8082

components/casemap/src/closer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl CaseMapCloser<CaseMapper> {
8282
Self {
8383
cm: CaseMapper::new(),
8484
unfold: DataPayload::from_static_ref(
85-
crate::provider::Baked::SINGLETON_PROPS_CASEMAP_UNFOLD_V1,
85+
crate::provider::Baked::SINGLETON_CASE_MAP_UNFOLD_V1_MARKER,
8686
),
8787
}
8888
}
@@ -131,7 +131,7 @@ impl<CM: AsRef<CaseMapper>> CaseMapCloser<CM> {
131131
Self {
132132
cm: casemapper,
133133
unfold: DataPayload::from_static_ref(
134-
crate::provider::Baked::SINGLETON_PROPS_CASEMAP_UNFOLD_V1,
134+
crate::provider::Baked::SINGLETON_CASE_MAP_UNFOLD_V1_MARKER,
135135
),
136136
}
137137
}

components/casemap/src/provider/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ const _: () = {
5050
pub use icu_collections as collections;
5151
}
5252
make_provider!(Baked);
53-
impl_props_casemap_v1!(Baked);
54-
impl_props_casemap_unfold_v1!(Baked);
53+
impl_case_map_v1_marker!(Baked);
54+
impl_case_map_unfold_v1_marker!(Baked);
5555
};
5656

5757
#[cfg(feature = "datagen")]

components/collator/src/comparison.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,17 @@ impl Collator {
7373
Self::try_new_unstable_internal(
7474
&crate::provider::Baked,
7575
DataPayload::from_static_ref(
76-
icu_normalizer::provider::Baked::SINGLETON_NORMALIZER_NFD_V1,
76+
icu_normalizer::provider::Baked::SINGLETON_CANONICAL_DECOMPOSITION_DATA_V1_MARKER,
7777
),
7878
DataPayload::from_static_ref(
79-
icu_normalizer::provider::Baked::SINGLETON_NORMALIZER_NFDEX_V1,
79+
icu_normalizer::provider::Baked::SINGLETON_CANONICAL_DECOMPOSITION_TABLES_V1_MARKER,
80+
),
81+
DataPayload::from_static_ref(
82+
crate::provider::Baked::SINGLETON_COLLATION_JAMO_V1_MARKER,
8083
),
81-
DataPayload::from_static_ref(crate::provider::Baked::SINGLETON_COLLATOR_JAMO_V1),
8284
|| {
8385
Ok(DataPayload::from_static_ref(
84-
crate::provider::Baked::SINGLETON_COLLATOR_PRIM_V1,
86+
crate::provider::Baked::SINGLETON_COLLATION_SPECIAL_PRIMARIES_V1_MARKER,
8587
))
8688
},
8789
locale,

components/collator/src/provider.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ const _: () = {
5959
pub use icu_collections as collections;
6060
}
6161
make_provider!(Baked);
62-
impl_collator_data_v1!(Baked);
63-
impl_collator_dia_v1!(Baked);
64-
impl_collator_jamo_v1!(Baked);
65-
impl_collator_meta_v1!(Baked);
66-
impl_collator_prim_v1!(Baked);
67-
impl_collator_reord_v1!(Baked);
62+
impl_collation_data_v1_marker!(Baked);
63+
impl_collation_diacritics_v1_marker!(Baked);
64+
impl_collation_jamo_v1_marker!(Baked);
65+
impl_collation_metadata_v1_marker!(Baked);
66+
impl_collation_special_primaries_v1_marker!(Baked);
67+
impl_collation_reordering_v1_marker!(Baked);
6868
};
6969

7070
#[cfg(feature = "datagen")]

0 commit comments

Comments
 (0)