diff --git a/components/calendar/src/provider.rs b/components/calendar/src/provider.rs index 10b99f3aaa7..32815fc4b90 100644 --- a/components/calendar/src/provider.rs +++ b/components/calendar/src/provider.rs @@ -83,11 +83,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[ #[derive( Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, Debug, yoke::Yokeable, zerofrom::ZeroFrom, )] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct EraStartDate { /// The year the era started in @@ -111,11 +108,8 @@ pub struct EraStartDate { marker(JapaneseExtendedErasV1Marker, "calendar/japanext@1", singleton) )] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct JapaneseErasV1<'data> { /// A map from era start dates to their era codes @@ -137,11 +131,8 @@ pub struct JapaneseErasV1<'data> { fallback_by = "region" ))] #[derive(Clone, Copy, Debug, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_structs)] // used in data provider pub struct WeekDataV1 { @@ -165,7 +156,8 @@ pub struct WeekDataV1 { fallback_by = "region" ))] #[derive(Clone, Copy, Debug, PartialEq)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_calendar::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_structs)] // used in data provider pub struct WeekDataV2 { diff --git a/components/calendar/src/provider/chinese_based.rs b/components/calendar/src/provider/chinese_based.rs index 3e2807b6227..fcb7a5bd9b2 100644 --- a/components/calendar/src/provider/chinese_based.rs +++ b/components/calendar/src/provider/chinese_based.rs @@ -30,11 +30,8 @@ use zerovec::ZeroVec; marker(DangiCacheV1Marker, "calendar/dangicache@1", singleton) )] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::provider::chinese_based), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider::chinese_based))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct ChineseBasedCacheV1<'data> { /// The extended year corresponding to the first data entry for this year @@ -138,11 +135,8 @@ impl<'data> ChineseBasedCacheV1<'data> { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ULE)] -#[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_calendar::provider), -)] +#[cfg_attr(feature = "datagen", derive(databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider))] #[repr(C, packed)] pub struct PackedChineseBasedYearInfo(pub u8, pub u8, pub u8); diff --git a/components/calendar/src/provider/islamic.rs b/components/calendar/src/provider/islamic.rs index 52d54145f17..f6ae72cc9ed 100644 --- a/components/calendar/src/provider/islamic.rs +++ b/components/calendar/src/provider/islamic.rs @@ -36,11 +36,8 @@ use zerovec::ZeroVec; ) )] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::provider::islamic), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider::islamic))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct IslamicCacheV1<'data> { /// The extended year corresponding to the first data entry for this year @@ -150,11 +147,8 @@ impl<'data> IslamicCacheV1<'data> { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, ULE)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[repr(C, packed)] pub struct PackedIslamicYearInfo(pub u8, pub u8); diff --git a/components/calendar/src/types.rs b/components/calendar/src/types.rs index b60d52a1976..8292b7dbf23 100644 --- a/components/calendar/src/types.rs +++ b/components/calendar/src/types.rs @@ -84,11 +84,8 @@ impl FormattableYear { /// [era-proposal]: https://tc39.es/proposal-intl-era-monthcode/ #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[allow(clippy::exhaustive_structs)] // this is a newtype -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::types), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::types))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct MonthCode(pub TinyStr4); @@ -712,11 +709,8 @@ fn test_from_minute_with_remainder_days() { #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[allow(missing_docs)] // The weekday variants should be self-obvious. #[repr(i8)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_calendar::types), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_calendar::types))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_enums)] // This is stable pub enum IsoWeekday { diff --git a/components/casemap/src/provider/exceptions.rs b/components/casemap/src/provider/exceptions.rs index 133892faf67..6b05f1df92b 100644 --- a/components/casemap/src/provider/exceptions.rs +++ b/components/casemap/src/provider/exceptions.rs @@ -34,11 +34,8 @@ const SURROGATES_LEN: u32 = 0xDFFF - SURROGATES_START + 1; /// to be stable, their Rust representation might not be. Use with caution. /// #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_casemap::provider::exceptions), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_casemap::provider::exceptions))] #[derive(Debug, Eq, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] pub struct CaseMapExceptions<'data> { #[cfg_attr(feature = "serde", serde(borrow))] diff --git a/components/casemap/src/provider/mod.rs b/components/casemap/src/provider/mod.rs index 08e5858e6e9..0599ff16810 100644 --- a/components/casemap/src/provider/mod.rs +++ b/components/casemap/src/provider/mod.rs @@ -73,11 +73,8 @@ pub use self::unfold::{CaseMapUnfoldV1, CaseMapUnfoldV1Marker}; /// #[icu_provider::data_struct(marker(CaseMapV1Marker, "props/casemap@1", singleton))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_casemap::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_casemap::provider))] #[yoke(prove_covariance_manually)] /// CaseMapper provides low-level access to the data necessary to /// convert characters and strings to upper, lower, or title case. diff --git a/components/casemap/src/provider/unfold.rs b/components/casemap/src/provider/unfold.rs index 3d23e2412c1..ab97063d6b3 100644 --- a/components/casemap/src/provider/unfold.rs +++ b/components/casemap/src/provider/unfold.rs @@ -20,11 +20,8 @@ use zerovec::ZeroMap; /// #[icu_provider::data_struct(marker(CaseMapUnfoldV1Marker, "props/casemap_unfold@1", singleton))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_casemap::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_casemap::provider))] #[derive(Debug, PartialEq, Clone)] #[yoke(prove_covariance_manually)] pub struct CaseMapUnfoldV1<'data> { diff --git a/components/collator/src/provider.rs b/components/collator/src/provider.rs index 506811cbcbe..126552fb74c 100644 --- a/components/collator/src/provider.rs +++ b/components/collator/src/provider.rs @@ -122,7 +122,8 @@ fn data_ce_to_primary(data_ce: u64, c: char) -> u32 { attributes_domain = "collator", ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_collator::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CollationDataV1<'data> { /// Mapping from `char` to `CollationElement32` (represented @@ -237,7 +238,8 @@ impl<'data> CollationDataV1<'data> { attributes_domain = "collator", ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_collator::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CollationDiacriticsV1<'data> { /// Secondary weights for characters starting from U+0300 up @@ -257,7 +259,8 @@ pub struct CollationDiacriticsV1<'data> { /// #[icu_provider::data_struct(marker(CollationJamoV1Marker, "collator/jamo@1", singleton))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_collator::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CollationJamoV1<'data> { /// `CollationElement32`s (as `u32`s) for the Hangul Jamo Unicode Block. @@ -280,7 +283,8 @@ pub struct CollationJamoV1<'data> { attributes_domain = "collator", ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_collator::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CollationReorderingV1<'data> { /// Limit of last reordered range. 0 if no reordering or no split bytes. @@ -369,7 +373,8 @@ impl<'data> CollationReorderingV1<'data> { attributes_domain = "collator", ))] #[derive(Debug, PartialEq, Clone, Copy)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_collator::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CollationMetadataV1 { /// See the mask constants in the `impl` block for the @@ -463,7 +468,8 @@ impl CollationMetadataV1 { singleton ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_collator::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CollationSpecialPrimariesV1<'data> { /// The primaries corresponding to `MaxVariable` diff --git a/components/collections/src/char16trie/trie.rs b/components/collections/src/char16trie/trie.rs index 82ff27ede95..96f34bbd7c5 100644 --- a/components/collections/src/char16trie/trie.rs +++ b/components/collections/src/char16trie/trie.rs @@ -76,7 +76,8 @@ fn skip_node_value(pos: usize, lead: u16) -> usize { /// - [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html) /// - [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API. #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = icu_collections::char16trie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = icu_collections::char16trie))] #[derive(Clone, Debug, PartialEq, Eq, ZeroFrom)] pub struct Char16Trie<'data> { /// An array of u16 containing the trie data. diff --git a/components/collections/src/codepointtrie/cptrie.rs b/components/collections/src/codepointtrie/cptrie.rs index 1d03a583992..16eb78c9d28 100644 --- a/components/collections/src/codepointtrie/cptrie.rs +++ b/components/collections/src/codepointtrie/cptrie.rs @@ -36,7 +36,8 @@ use zerovec::ZeroVec; /// Also see [`UCPTrieType`](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ucptrie_8h.html) in ICU4C. #[derive(Clone, Copy, PartialEq, Debug, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = icu_collections::codepointtrie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = icu_collections::codepointtrie))] pub enum TrieType { /// Represents the "fast" type code point tries for the /// [`TrieType`] trait. The "fast max" limit is set to `0xffff`. @@ -135,7 +136,8 @@ pub struct CodePointTrie<'trie, T: TrieValue> { /// This struct contains the fixed-length header fields of a [`CodePointTrie`]. #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = icu_collections::codepointtrie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = icu_collections::codepointtrie))] #[derive(Copy, Clone, Debug, Eq, PartialEq, Yokeable, ZeroFrom)] pub struct CodePointTrieHeader { /// The code point of the start of the last range of the trie. A diff --git a/components/datetime/src/fields/length.rs b/components/datetime/src/fields/length.rs index 9636f6f699d..acfe5ae829a 100644 --- a/components/datetime/src/fields/length.rs +++ b/components/datetime/src/fields/length.rs @@ -26,11 +26,8 @@ impl std::error::Error for LengthError {} /// [LDML documentation in UTS 35](https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns) /// for more details. #[derive(Debug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::fields), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::fields))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_enums)] // part of data struct pub enum FieldLength { @@ -166,11 +163,8 @@ unsafe impl ULE for FieldLengthULE { /// Various numeric overrides for datetime patterns /// as found in CLDR #[derive(Debug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::fields), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::fields))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[non_exhaustive] pub enum FieldNumericOverrides { diff --git a/components/datetime/src/fields/mod.rs b/components/datetime/src/fields/mod.rs index d0a2da58bbb..b557d84ce1b 100644 --- a/components/datetime/src/fields/mod.rs +++ b/components/datetime/src/fields/mod.rs @@ -38,11 +38,8 @@ impl std::error::Error for Error {} /// repetition of a specific pattern character one or more times within the pattern string. /// The pattern character is known as the field symbol, which indicates the particular meaning for the field. #[derive(Debug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::fields), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::fields))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[zerovec::make_ule(FieldULE)] pub struct Field { diff --git a/components/datetime/src/fields/symbols.rs b/components/datetime/src/fields/symbols.rs index a3dd9d1b98d..91b43c4766c 100644 --- a/components/datetime/src/fields/symbols.rs +++ b/components/datetime/src/fields/symbols.rs @@ -35,7 +35,8 @@ impl std::error::Error for SymbolError {} /// [`Hour::H24`]. Each field symbol is represented within the date formatting pattern string /// by a distinct character from the set of `A..Z` and `a..z`. #[derive(Debug, Eq, PartialEq, Clone, Copy)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_datetime::fields))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::fields))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_enums)] // part of data struct pub enum FieldSymbol { @@ -401,11 +402,8 @@ macro_rules! field_type { #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, yoke::Yokeable, zerofrom::ZeroFrom)] // FIXME: This should be replaced with a custom derive. // See: https://github.com/unicode-org/icu4x/issues/1044 - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::fields), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::fields))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::enum_variant_names)] #[repr(u8)] @@ -736,11 +734,8 @@ impl LengthType for TimeZone { #[derive( Debug, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, yoke::Yokeable, zerofrom::ZeroFrom, )] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::fields), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::fields))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::enum_variant_names)] #[repr(u8)] diff --git a/components/datetime/src/pattern/hour_cycle.rs b/components/datetime/src/pattern/hour_cycle.rs index 5c111e7c4e1..eb651684e20 100644 --- a/components/datetime/src/pattern/hour_cycle.rs +++ b/components/datetime/src/pattern/hour_cycle.rs @@ -14,11 +14,8 @@ use icu_provider::prelude::*; /// Used to represent either H11/H12, or H23/H24. Skeletons only store these /// hour cycles as H12 or H23. #[derive(Debug, PartialEq, Clone, Copy, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::pattern), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_enums)] // this type is stable pub enum CoarseHourCycle { diff --git a/components/datetime/src/pattern/item/generic.rs b/components/datetime/src/pattern/item/generic.rs index 7cdf9eb4bf8..26c60e2106f 100644 --- a/components/datetime/src/pattern/item/generic.rs +++ b/components/datetime/src/pattern/item/generic.rs @@ -3,7 +3,8 @@ // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). #[derive(Debug, PartialEq, Eq, Clone, Copy)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_datetime::pattern))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_enums)] // this type is stable pub enum GenericPatternItem { diff --git a/components/datetime/src/pattern/item/mod.rs b/components/datetime/src/pattern/item/mod.rs index 444c4dbdde8..102555844e6 100644 --- a/components/datetime/src/pattern/item/mod.rs +++ b/components/datetime/src/pattern/item/mod.rs @@ -11,11 +11,8 @@ use core::convert::TryFrom; pub use generic::GenericPatternItem; #[derive(Debug, PartialEq, Eq, Clone, Copy)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::pattern::item), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern::item))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_enums)] // this type is stable pub enum PatternItem { diff --git a/components/datetime/src/pattern/mod.rs b/components/datetime/src/pattern/mod.rs index 7f7e8dfb217..6847c983d6b 100644 --- a/components/datetime/src/pattern/mod.rs +++ b/components/datetime/src/pattern/mod.rs @@ -20,11 +20,8 @@ pub use item::{GenericPatternItem, PatternItem}; #[derive( Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, yoke::Yokeable, zerofrom::ZeroFrom, )] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::pattern), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[non_exhaustive] pub enum TimeGranularity { diff --git a/components/datetime/src/pattern/runtime/generic.rs b/components/datetime/src/pattern/runtime/generic.rs index 253614fe041..ad934c40c63 100644 --- a/components/datetime/src/pattern/runtime/generic.rs +++ b/components/datetime/src/pattern/runtime/generic.rs @@ -14,11 +14,8 @@ use zerovec::ZeroVec; #[derive(Debug, PartialEq, Eq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] #[allow(clippy::exhaustive_structs)] // this type is stable -#[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_datetime::pattern::runtime), -)] +#[cfg_attr(feature = "datagen", derive(databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern::runtime))] pub struct GenericPattern<'data> { pub items: ZeroVec<'data, GenericPatternItem>, } diff --git a/components/datetime/src/pattern/runtime/pattern.rs b/components/datetime/src/pattern/runtime/pattern.rs index b799010548f..dc40eda226d 100644 --- a/components/datetime/src/pattern/runtime/pattern.rs +++ b/components/datetime/src/pattern/runtime/pattern.rs @@ -11,11 +11,8 @@ use icu_provider::prelude::*; use zerovec::{ule::AsULE, ZeroSlice, ZeroVec}; #[derive(Debug, PartialEq, Eq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_datetime::pattern::runtime), -)] +#[cfg_attr(feature = "datagen", derive(databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern::runtime))] #[zerovec::make_varule(PatternULE)] #[zerovec::derive(Debug)] #[zerovec::skip_derive(Ord)] diff --git a/components/datetime/src/pattern/runtime/plural.rs b/components/datetime/src/pattern/runtime/plural.rs index 352f56822cb..5cd5d217cdb 100644 --- a/components/datetime/src/pattern/runtime/plural.rs +++ b/components/datetime/src/pattern/runtime/plural.rs @@ -12,11 +12,8 @@ use icu_provider::prelude::*; /// A collection of plural variants of a pattern. #[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::pattern::runtime), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern::runtime))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_structs)] // part of data struct pub struct PluralPattern<'data> { @@ -136,11 +133,8 @@ impl<'data> PluralPattern<'data> { #[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] #[allow(clippy::large_enum_variant)] #[allow(clippy::exhaustive_enums)] // this type is stable -#[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_datetime::pattern::runtime), -)] +#[cfg_attr(feature = "datagen", derive(databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::pattern::runtime))] pub enum PatternPlurals<'data> { /// A collection of pattern variants for when plurals differ. MultipleVariants(PluralPattern<'data>), diff --git a/components/datetime/src/provider/calendar/mod.rs b/components/datetime/src/provider/calendar/mod.rs index a925472cd55..1fd90824ee6 100644 --- a/components/datetime/src/provider/calendar/mod.rs +++ b/components/datetime/src/provider/calendar/mod.rs @@ -40,11 +40,8 @@ size_test!(DateLengthsV1, date_lengths_v1_size, 224); marker(RocDateLengthsV1Marker, "datetime/roc/datelengths@1") )] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct DateLengthsV1<'data> { /// Date pattern data, broken down by pattern length. @@ -74,11 +71,8 @@ size_test!(TimeLengthsV1, time_lengths_v1_size, 264); /// #[icu_provider::data_struct(marker(TimeLengthsV1Marker, "datetime/timelengths@1",))] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct TimeLengthsV1<'data> { /// These patterns are common uses of time formatting, broken down by the length of the @@ -111,11 +105,8 @@ pub mod patterns { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Clone, Default, yoke::Yokeable, zerofrom::ZeroFrom)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar::patterns), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar::patterns))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct LengthPatternsV1<'data> { /// A full length date/time pattern. @@ -140,11 +131,8 @@ pub mod patterns { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Clone, Default, yoke::Yokeable, zerofrom::ZeroFrom)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar::patterns), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar::patterns))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct GenericLengthPatternsV1<'data> { /// A full length glue pattern of other formatted elements. diff --git a/components/datetime/src/provider/calendar/symbols.rs b/components/datetime/src/provider/calendar/symbols.rs index 4e8dc118b45..a5f6a934abc 100644 --- a/components/datetime/src/provider/calendar/symbols.rs +++ b/components/datetime/src/provider/calendar/symbols.rs @@ -40,11 +40,8 @@ size_test!(DateSymbolsV1, date_symbols_v1_size, 3792); marker(RocDateSymbolsV1Marker, "datetime/roc/datesymbols@1") )] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct DateSymbolsV1<'data> { @@ -82,11 +79,8 @@ size_test!(TimeSymbolsV1, time_symbols_v1_size, 768); /// #[icu_provider::data_struct(marker(TimeSymbolsV1Marker, "datetime/timesymbols@1",))] #[derive(Debug, PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct TimeSymbolsV1<'data> { @@ -112,11 +106,8 @@ pub struct TimeSymbolsV1<'data> { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Clone, Default, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct Eras<'data> { @@ -153,11 +144,8 @@ macro_rules! symbols { use super::*; #[derive(Debug, PartialEq, Clone, zerofrom::ZeroFrom, yoke::Yokeable)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar::$name), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar::$name))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] #[doc = concat!("Locale data for ", stringify!($field_id), " corresponding to the symbols.")] @@ -172,11 +160,8 @@ macro_rules! symbols { // UTS 35 specifies that `format` widths are mandatory, // except for `short`. #[derive(Debug, PartialEq, Clone, Default, yoke::Yokeable, zerofrom::ZeroFrom)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar::$name), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar::$name))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] #[doc = concat!("Symbol data for the \"format\" style formatting of ", stringify!($field_id), @@ -205,11 +190,8 @@ macro_rules! symbols { // UTS 35 specifies that `stand_alone` widths are optional #[derive(Debug, PartialEq, Clone, Default, yoke::Yokeable, zerofrom::ZeroFrom)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar::$name), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar::$name))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] #[doc = concat!("Symbol data for the \"stand-alone\" style formatting of ", stringify!($field_id), @@ -236,11 +218,8 @@ macro_rules! symbols { } #[derive(Debug, PartialEq, Clone, Default, yoke::Yokeable, zerofrom::ZeroFrom)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::calendar::$name), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::calendar::$name))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] #[doc = concat!("The struct containing the symbol data for ", stringify!($field_id), diff --git a/components/datetime/src/provider/neo.rs b/components/datetime/src/provider/neo.rs index 4549a28c7c4..90301b57ca3 100644 --- a/components/datetime/src/provider/neo.rs +++ b/components/datetime/src/provider/neo.rs @@ -349,11 +349,8 @@ size_test!(YearNamesV1, year_names_v1_size, 48); marker(RocYearNamesV1Marker, "datetime/symbols/roc/years@1") )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub enum YearNamesV1<'data> { @@ -396,11 +393,8 @@ size_test!(MonthNamesV1, month_names_v1_size, 32); marker(RocMonthNamesV1Marker, "datetime/symbols/roc/months@1") )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub enum MonthNamesV1<'data> { @@ -426,11 +420,8 @@ pub enum MonthNamesV1<'data> { /// Represents a simple substitution pattern; /// i.e. a string with a single placeholder #[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct SimpleSubstitutionPattern<'data> { /// The pattern @@ -489,11 +480,8 @@ size_test!(LinearNamesV1, linear_names_v1_size, 24); marker(PlaceholderDaySymbolsV1Marker, "datetime/symbols/placeholder/days@1"), )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct LinearNamesV1<'data> { @@ -547,11 +535,8 @@ size_test!(GluePatternV1, glue_pattern_v1_size, 24); /// #[icu_provider::data_struct(marker(GluePatternV1Marker, "datetime/patterns/glue@1"))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct GluePatternV1<'data> { @@ -569,11 +554,8 @@ pub struct GluePatternV1<'data> { // } #[allow(missing_docs)] // TODO #[derive(Debug, Copy, Clone, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct SkeletonDataIndex { /// If true, the first pattern is for `Long`. @@ -672,11 +654,8 @@ impl AsULE for SkeletonDataIndex { marker(TimeNeoSkeletonPatternsV1Marker, "datetime/patterns/time_skeleton@1") )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(missing_docs)] // TODO pub struct PackedSkeletonDataV1<'data> { @@ -711,11 +690,8 @@ impl<'data> PackedSkeletonDataV1<'data> { "datetime/patterns/datetime_skeleton@1" ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::neo), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::neo))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] #[allow(missing_docs)] // TODO diff --git a/components/datetime/src/provider/time_zones.rs b/components/datetime/src/provider/time_zones.rs index b07ec2e667b..f47937d5a91 100644 --- a/components/datetime/src/provider/time_zones.rs +++ b/components/datetime/src/provider/time_zones.rs @@ -39,11 +39,8 @@ pub(crate) mod tz { /// #[icu_provider::data_struct(TimeZoneFormatsV1Marker = "time_zone/formats@1")] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::time_zones), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] // TODO: Consider renaming to "TimeZoneEssentialsV1" @@ -86,11 +83,8 @@ pub struct TimeZoneFormatsV1<'data> { /// #[icu_provider::data_struct(ExemplarCitiesV1Marker = "time_zone/exemplar_cities@1")] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::time_zones), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct ExemplarCitiesV1<'data>( @@ -107,11 +101,8 @@ pub struct ExemplarCitiesV1<'data>( /// #[icu_provider::data_struct(MetazoneGenericNamesLongV1Marker = "time_zone/generic_long@1")] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::time_zones), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct MetazoneGenericNamesLongV1<'data> { @@ -133,11 +124,8 @@ pub struct MetazoneGenericNamesLongV1<'data> { /// #[icu_provider::data_struct(MetazoneGenericNamesShortV1Marker = "time_zone/generic_short@1")] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::time_zones), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct MetazoneGenericNamesShortV1<'data> { @@ -160,11 +148,8 @@ pub struct MetazoneGenericNamesShortV1<'data> { /// #[icu_provider::data_struct(MetazoneSpecificNamesLongV1Marker = "time_zone/specific_long@1")] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::time_zones), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct MetazoneSpecificNamesLongV1<'data> { @@ -187,11 +172,8 @@ pub struct MetazoneSpecificNamesLongV1<'data> { /// #[icu_provider::data_struct(MetazoneSpecificNamesShortV1Marker = "time_zone/specific_short@1")] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_datetime::provider::time_zones), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct MetazoneSpecificNamesShortV1<'data> { diff --git a/components/decimal/src/provider.rs b/components/decimal/src/provider.rs index db3b1b0bec4..15a00ca1bf3 100644 --- a/components/decimal/src/provider.rs +++ b/components/decimal/src/provider.rs @@ -54,11 +54,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[DecimalSymbolsV1Marker::INFO]; /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_decimal::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_decimal::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct AffixesV1<'data> { /// String to prepend before the decimal number. @@ -79,11 +76,8 @@ pub struct AffixesV1<'data> { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Clone, yoke::Yokeable, Copy, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_decimal::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_decimal::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct GroupingSizesV1 { /// The size of the first (lowest-magnitude) group. @@ -110,11 +104,8 @@ pub struct GroupingSizesV1 { /// #[icu_provider::data_struct(DecimalSymbolsV1Marker = "decimal/symbols@1")] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_decimal::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_decimal::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct DecimalSymbolsV1<'data> { /// Prefix and suffix to apply when a negative sign is needed. diff --git a/components/experimental/src/compactdecimal/provider.rs b/components/experimental/src/compactdecimal/provider.rs index 87d2bbe2ad1..3cfe585671e 100644 --- a/components/experimental/src/compactdecimal/provider.rs +++ b/components/experimental/src/compactdecimal/provider.rs @@ -57,11 +57,8 @@ pub use crate::provider::Baked; )] #[derive(Debug, Clone, Default, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::compactdecimal::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::compactdecimal::provider))] #[yoke(prove_covariance_manually)] pub struct CompactDecimalPatternDataV1<'data> { /// A map keyed on log10 of the CLDR `type` attribute and the CLDR `count` attribute. @@ -75,11 +72,8 @@ pub struct CompactDecimalPatternDataV1<'data> { #[zerovec::derive(Debug)] #[derive(Copy, Clone, PartialOrd, Ord, PartialEq, Eq, Debug)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::compactdecimal::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::compactdecimal::provider))] #[repr(u8)] pub enum Count { /// The CLDR keyword `zero`. @@ -121,12 +115,9 @@ impl From for Count { )] #[zerovec::make_varule(PatternULE)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::compactdecimal::provider), - zerovec::derive(Serialize), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::compactdecimal::provider))] +#[cfg_attr(feature = "datagen", zerovec::derive(Serialize))] #[zerovec::derive(Debug)] #[cfg_attr(feature = "serde", zerovec::derive(Deserialize))] pub struct Pattern<'data> { diff --git a/components/experimental/src/displaynames/provider.rs b/components/experimental/src/displaynames/provider.rs index 5c6623be13a..0c7c94d31bb 100644 --- a/components/experimental/src/displaynames/provider.rs +++ b/components/experimental/src/displaynames/provider.rs @@ -37,11 +37,8 @@ pub use crate::provider::Baked; #[icu_provider::data_struct(RegionDisplayNamesV1Marker = "displaynames/regions@1")] #[derive(Debug, PartialEq, Clone, Default)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::displaynames::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::displaynames::provider))] #[yoke(prove_covariance_manually)] /// RegionDisplayNames provides mapping between a region code and locale display name. pub struct RegionDisplayNamesV1<'data> { @@ -56,11 +53,8 @@ pub struct RegionDisplayNamesV1<'data> { #[icu_provider::data_struct(LanguageDisplayNamesV1Marker = "displaynames/languages@1")] #[derive(Debug, PartialEq, Clone, Default)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::displaynames::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::displaynames::provider))] #[yoke(prove_covariance_manually)] /// LanguageDisplayNames provides mapping between languages and display names. pub struct LanguageDisplayNamesV1<'data> { @@ -81,11 +75,8 @@ pub struct LanguageDisplayNamesV1<'data> { #[icu_provider::data_struct(ScriptDisplayNamesV1Marker = "displaynames/scripts@1")] #[derive(Debug, PartialEq, Clone, Default)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::displaynames::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::displaynames::provider))] #[yoke(prove_covariance_manually)] /// ScriptDisplayNames provides mapping between a script code and it's display name. pub struct ScriptDisplayNamesV1<'data> { @@ -100,11 +91,8 @@ pub struct ScriptDisplayNamesV1<'data> { #[icu_provider::data_struct(LocaleDisplayNamesV1Marker = "displaynames/locales@1")] #[derive(Debug, PartialEq, Clone, Default)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::displaynames::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::displaynames::provider))] #[yoke(prove_covariance_manually)] /// LocaleDisplayNames provides mapping between locales and display names. pub struct LocaleDisplayNamesV1<'data> { @@ -125,11 +113,8 @@ pub struct LocaleDisplayNamesV1<'data> { #[icu_provider::data_struct(VariantDisplayNamesV1Marker = "displaynames/variants@1")] #[derive(Debug, PartialEq, Clone, Default)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::displaynames::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::displaynames::provider))] #[yoke(prove_covariance_manually)] /// VariantDisplayNames provides the user-translated names for the variant-code values. pub struct VariantDisplayNamesV1<'data> { diff --git a/components/experimental/src/duration/provider.rs b/components/experimental/src/duration/provider.rs index cbd017147e0..175f5d07cd3 100644 --- a/components/experimental/src/duration/provider.rs +++ b/components/experimental/src/duration/provider.rs @@ -12,11 +12,8 @@ use icu_provider::prelude::*; #[icu_provider::data_struct(DigitalDurationDataV1Marker = "duration/digital@1")] #[derive(Debug, Clone, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::duration::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::duration::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// A struct containing digital duration data (durationUnit-type-* patterns). @@ -39,11 +36,8 @@ pub struct DigitalDurationDataV1<'data> { } #[derive(Debug, Clone, Copy, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::duration::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::duration::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// A struct containing the number of digits to pad hours, minutes, and seconds. pub struct HmsPadding { @@ -56,11 +50,8 @@ pub struct HmsPadding { } #[derive(Debug, Clone, Copy, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::duration::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::duration::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// A struct containing the number of digits to pad minutes, and seconds. pub struct MsPadding { @@ -71,11 +62,8 @@ pub struct MsPadding { } #[derive(Debug, Clone, Copy, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::duration::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::duration::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// A struct containing the number of digits to pad hours and minutes. pub struct HmPadding { diff --git a/components/experimental/src/personnames/provider.rs b/components/experimental/src/personnames/provider.rs index 55889389dcf..d37773050b2 100644 --- a/components/experimental/src/personnames/provider.rs +++ b/components/experimental/src/personnames/provider.rs @@ -43,10 +43,8 @@ pub use crate::provider::Baked; /// (`initial`, `initialSequence`). #[icu_provider::data_struct(PersonNamesFormatV1Marker = "personnames/personnames@1")] #[derive(PartialEq, Clone)] -#[cfg_attr(feature = "datagen", -derive(serde::Serialize, databake::Bake), -databake(path = icu_experimental::personnames::provider)) -] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::personnames::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct PersonNamesFormatV1<'data> { /// ko vi yue zh @@ -166,11 +164,9 @@ pub type PersonNamesFormattingAttributesMask = u32; /// #[zerovec::make_varule(PersonNamesFormattingDataVarULE)] #[zerovec::skip_derive(ZeroMapKV, Ord)] -#[cfg_attr(feature = "datagen", -derive(serde::Serialize, databake::Bake), -databake(path = icu_experimental::personnames::provider), -zerovec::derive(Serialize)) -] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::personnames::provider))] +#[cfg_attr(feature = "datagen", zerovec::derive(Serialize))] #[cfg_attr( feature = "serde", derive(serde::Deserialize), diff --git a/components/experimental/src/relativetime/provider.rs b/components/experimental/src/relativetime/provider.rs index 415bb5561cc..a3c943b4b50 100644 --- a/components/experimental/src/relativetime/provider.rs +++ b/components/experimental/src/relativetime/provider.rs @@ -58,11 +58,8 @@ pub use crate::provider::Baked; )] #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::relativetime::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::relativetime::provider))] #[yoke(prove_covariance_manually)] pub struct RelativeTimePatternDataV1<'data> { /// Mapping for relative times with unique names. @@ -98,11 +95,8 @@ pub struct PluralCategoryStr<'data>(pub PluralCategory, pub Cow<'data, str>); /// Display specification for relative times, split over potential plural patterns. #[derive(Debug, PartialEq, yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_experimental::relativetime::provider) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::relativetime::provider))] #[yoke(prove_covariance_manually)] pub struct PluralElements<'data, T: ?Sized> { /// Optional entries for categories other than PluralCategory::Other diff --git a/components/experimental/src/transliterate/provider.rs b/components/experimental/src/transliterate/provider.rs index 3809cc3b30c..b93053998ad 100644 --- a/components/experimental/src/transliterate/provider.rs +++ b/components/experimental/src/transliterate/provider.rs @@ -32,7 +32,8 @@ use zerovec::*; #[icu_provider::data_struct(TransliteratorRulesV1Marker = "transliterator/rules@1")] #[derive(Debug, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_experimental::transliterate::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::transliterate::provider))] pub struct RuleBasedTransliterator<'a> { /// Whether this transliterator is accessible directly through the constructor. /// Hidden transliterators are intended as dependencies for visible transliterators, @@ -129,7 +130,8 @@ pub struct Rule<'a> { /// The special matchers and replacers used by this transliterator. #[derive(Debug, Clone, zerofrom::ZeroFrom, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_experimental::transliterate::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_experimental::transliterate::provider))] pub struct VarTable<'a> { /// Variable definitions. #[cfg_attr(feature = "serde", serde(borrow))] diff --git a/components/list/src/provider/mod.rs b/components/list/src/provider/mod.rs index 020b804a7a8..d78b3ea5cda 100644 --- a/components/list/src/provider/mod.rs +++ b/components/list/src/provider/mod.rs @@ -68,11 +68,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[ UnitListV2Marker = "list/unit@2" )] #[derive(Clone, Debug, PartialEq)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_list::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_list::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct ListFormatterPatternsV2<'data> { /// The start pattern @@ -119,11 +116,8 @@ impl DynamicDataMarker for ErasedListV2Marker { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Clone, Debug, PartialEq, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_list::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_list::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct ConditionalListJoinerPattern<'data> { /// The default pattern @@ -145,11 +139,8 @@ pub struct ConditionalListJoinerPattern<'data> { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Clone, Debug, PartialEq, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_list::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_list::provider))] pub struct SpecialCasePattern<'data> { /// The condition on the following element pub condition: SerdeDFA<'data>, diff --git a/components/locale/src/provider.rs b/components/locale/src/provider.rs index 69344f5c833..c1a85ebedb1 100644 --- a/components/locale/src/provider.rs +++ b/components/locale/src/provider.rs @@ -126,11 +126,8 @@ pub struct LanguageStrStrPair<'a>( #[icu_provider::data_struct(marker(AliasesV2Marker, "locale/aliases@2", singleton))] #[derive(PartialEq, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_locale::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_locale::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] /// This alias data is used for locale canonicalization. Each field defines a @@ -204,11 +201,8 @@ pub struct AliasesV2<'data> { singleton ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_locale::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_locale::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// This likely subtags data is used for the minimize and maximize operations. /// Each field defines a mapping from an old identifier to a new identifier, @@ -252,11 +246,8 @@ pub struct LikelySubtagsForLanguageV1<'data> { singleton ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_locale::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_locale::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// This likely subtags data is used for the minimize and maximize operations. /// Each field defines a mapping from an old identifier to a new identifier, @@ -298,11 +289,8 @@ pub struct LikelySubtagsForScriptRegionV1<'data> { singleton ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_locale::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_locale::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// This likely subtags data is used for full coverage of locales, including ones that /// don't otherwise have data in the Common Locale Data Repository (CLDR). @@ -337,11 +325,8 @@ pub struct LikelySubtagsExtendedV1<'data> { /// Locale fallback rules derived from CLDR parent locales data. #[icu_provider::data_struct(marker(ParentsV1Marker, "locale/parents@1", singleton))] #[derive(Default, Clone, PartialEq, Debug)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_locale::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_locale::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct ParentsV1<'data> { @@ -353,11 +338,8 @@ pub struct ParentsV1<'data> { #[icu_provider::data_struct(marker(ScriptDirectionV1Marker, "locale/script_dir@1", singleton))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_locale::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_locale::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// This directionality data is used to determine the script directionality of a locale. /// diff --git a/components/normalizer/src/provider.rs b/components/normalizer/src/provider.rs index 69cbe4baf5b..a1fa0188df6 100644 --- a/components/normalizer/src/provider.rs +++ b/components/normalizer/src/provider.rs @@ -74,7 +74,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[ singleton ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_normalizer::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct DecompositionDataV1<'data> { /// Trie for NFD decomposition. @@ -99,7 +100,8 @@ pub struct DecompositionDataV1<'data> { marker(Uts46DecompositionSupplementV1Marker, "normalizer/uts46d@1", singleton) )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_normalizer::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct DecompositionSupplementV1<'data> { /// Trie for the decompositions that differ from NFD. @@ -152,7 +154,8 @@ impl DecompositionSupplementV1<'_> { ) )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_normalizer::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct DecompositionTablesV1<'data> { /// Decompositions that are fully within the BMP @@ -173,7 +176,8 @@ pub struct DecompositionTablesV1<'data> { /// #[icu_provider::data_struct(marker(CanonicalCompositionsV1Marker, "normalizer/comp@1", singleton))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_normalizer::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct CanonicalCompositionsV1<'data> { /// Trie keys are two-`char` strings with the second @@ -197,7 +201,8 @@ pub struct CanonicalCompositionsV1<'data> { singleton ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_normalizer::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct NonRecursiveDecompositionSupplementV1<'data> { /// Trie for the supplementary non-recursive decompositions diff --git a/components/plurals/src/lib.rs b/components/plurals/src/lib.rs index 58b44fcfe63..e38d1314b48 100644 --- a/components/plurals/src/lib.rs +++ b/components/plurals/src/lib.rs @@ -144,11 +144,8 @@ pub enum PluralRuleType { /// assert_eq!(pr.category_for(5_usize), PluralCategory::Other); /// ``` #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Ord, PartialOrd)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_plurals) -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_plurals))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[repr(u8)] #[zerovec::make_ule(PluralCategoryULE)] diff --git a/components/plurals/src/provider.rs b/components/plurals/src/provider.rs index c2524adbbde..9076b8c2626 100644 --- a/components/plurals/src/provider.rs +++ b/components/plurals/src/provider.rs @@ -70,11 +70,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[ OrdinalV1Marker = "plurals/ordinal@1" )] #[derive(Default, Clone, PartialEq, Debug)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_plurals::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_plurals::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct PluralRulesV1<'data> { /// Rule that matches [`PluralCategory::Zero`](super::PluralCategory::Zero), or `None` if not present. @@ -117,11 +114,8 @@ mod ranges { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Ord, PartialOrd)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_plurals::provider), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_plurals::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[zerovec::make_ule(RawPluralCategoryULE)] #[repr(u8)] @@ -193,11 +187,8 @@ mod ranges { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Ord, PartialOrd)] - #[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_plurals::provider), - )] + #[cfg_attr(feature = "datagen", derive(databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_plurals::provider))] #[zerovec::make_ule(UnvalidatedPluralRangeULE)] pub struct UnvalidatedPluralRange(pub u8); @@ -314,11 +305,8 @@ mod ranges { /// #[icu_provider::data_struct(PluralRangesV1Marker = "plurals/ranges@1")] #[derive(Clone, PartialEq, Debug)] - #[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_plurals::provider), - )] + #[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_plurals::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct PluralRangesV1<'data> { diff --git a/components/plurals/src/rules/runtime/ast.rs b/components/plurals/src/rules/runtime/ast.rs index 7a2e6993b52..39c34343399 100644 --- a/components/plurals/src/rules/runtime/ast.rs +++ b/components/plurals/src/rules/runtime/ast.rs @@ -14,11 +14,8 @@ use zerovec::{ }; #[derive(yoke::Yokeable, zerofrom::ZeroFrom, Clone, PartialEq, Debug)] -#[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_plurals::rules::runtime::ast), -)] +#[cfg_attr(feature = "datagen", derive(databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_plurals::rules::runtime::ast))] #[allow(clippy::exhaustive_structs)] // Reference AST is non-public and this type is stable pub struct Rule<'data>(pub VarZeroVec<'data, RelationULE>); diff --git a/components/properties/src/provider.rs b/components/properties/src/provider.rs index 0196bf0224e..c79a9963489 100644 --- a/components/properties/src/provider.rs +++ b/components/properties/src/provider.rs @@ -383,11 +383,8 @@ pub mod bidi_data; marker(XidStartV1Marker, "props/XIDS@1", singleton) )] #[derive(Debug, Eq, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[non_exhaustive] pub enum PropertyCodePointSetV1<'data> { @@ -409,11 +406,8 @@ pub enum PropertyCodePointSetV1<'data> { /// to be stable, their Rust representation might not be. Use with caution. /// #[derive(Clone, Debug, Eq, PartialEq, yoke::Yokeable, zerofrom::ZeroFrom)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[non_exhaustive] pub enum PropertyCodePointMapV1<'data, T: TrieValue> { @@ -428,11 +422,8 @@ macro_rules! data_struct_generic { $( #[doc = core::concat!("Data marker for the '", stringify!($ty), "' Unicode property")] #[derive(Debug, Default)] - #[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_properties::provider), - )] + #[cfg_attr(feature = "datagen", derive(databake::Bake))] + #[cfg_attr(feature = "datagen", databake(path = icu_properties::provider))] pub struct $marker; impl icu_provider::DynamicDataMarker for $marker { type DataStruct = PropertyCodePointMapV1<'static, crate::$ty>; @@ -497,11 +488,8 @@ data_struct_generic!( ) )] #[derive(Debug, Eq, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[non_exhaustive] pub enum PropertyUnicodeSetV1<'data> { @@ -576,11 +564,8 @@ impl<'data> PropertyUnicodeSetV1<'data> { singleton ))] #[derive(Debug, Eq, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct ScriptWithExtensionsPropertyV1<'data> { /// Note: The `ScriptWithExt` values in this array will assume a 12-bit layout. The 2 diff --git a/components/properties/src/provider/bidi_data.rs b/components/properties/src/provider/bidi_data.rs index f12c7d3e977..afec43d6d5e 100644 --- a/components/properties/src/provider/bidi_data.rs +++ b/components/properties/src/provider/bidi_data.rs @@ -38,11 +38,8 @@ use zerovec::ule::{AsULE, CharULE, UleError, ULE}; singleton ))] #[derive(Debug, Eq, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider::bidi_data), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider::bidi_data))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct BidiAuxiliaryPropertiesV1<'data> { /// A `CodePointTrie` efficiently storing the data from which property values diff --git a/components/properties/src/provider/names.rs b/components/properties/src/provider/names.rs index 1cc9c48e908..550db25b7c6 100644 --- a/components/properties/src/provider/names.rs +++ b/components/properties/src/provider/names.rs @@ -221,11 +221,8 @@ impl NormalizedPropertyNameStr { marker(SentenceBreakNameToValueV1Marker, "propnames/from/SB@1", singleton), marker(WordBreakNameToValueV1Marker, "propnames/from/WB@1", singleton) )] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct PropertyValueNameToEnumMapV1<'data> { @@ -255,11 +252,8 @@ pub struct PropertyValueNameToEnumMapV1<'data> { singleton ) )] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct PropertyEnumToValueNameSparseMapV1<'data> { @@ -384,11 +378,8 @@ pub struct PropertyEnumToValueNameSparseMapV1<'data> { singleton ) )] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct PropertyEnumToValueNameLinearMapV1<'data> { @@ -412,11 +403,8 @@ pub struct PropertyEnumToValueNameLinearMapV1<'data> { "propnames/to/short/linear4/sc@1", singleton ))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_properties::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_properties::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct PropertyScriptToIcuScriptMapV1<'data> { diff --git a/components/segmenter/src/provider/lstm.rs b/components/segmenter/src/provider/lstm.rs index 03c72321e0f..5ddcaa78ede 100644 --- a/components/segmenter/src/provider/lstm.rs +++ b/components/segmenter/src/provider/lstm.rs @@ -101,11 +101,8 @@ lstm_matrix!(LstmMatrix2, 2); lstm_matrix!(LstmMatrix3, 3); #[derive(PartialEq, Debug, Clone, Copy)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize,databake::Bake), - databake(path = icu_segmenter::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_segmenter::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] /// The type of LSTM model /// @@ -364,11 +361,8 @@ impl databake::BakeSize for LstmDataFloat32<'_> { attributes_domain = "segmenter" ))] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_segmenter::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_segmenter::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] #[non_exhaustive] diff --git a/components/segmenter/src/provider/mod.rs b/components/segmenter/src/provider/mod.rs index af089958c36..1521ecf6598 100644 --- a/components/segmenter/src/provider/mod.rs +++ b/components/segmenter/src/provider/mod.rs @@ -79,11 +79,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[ marker(SentenceBreakDataV2Marker, "segmenter/sentence@2", singleton) )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize,databake::Bake), - databake(path = icu_segmenter::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_segmenter::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct RuleBreakDataV2<'data> { /// Property table. @@ -136,11 +133,8 @@ pub struct RuleBreakDataV2<'data> { ) )] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize,databake::Bake), - databake(path = icu_segmenter::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_segmenter::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct UCharDictionaryBreakDataV1<'data> { /// Dictionary data of char16trie. @@ -155,11 +149,8 @@ impl DynamicDataMarker for UCharDictionaryBreakDataV1Marker { } #[derive(Clone, Copy, PartialEq, Debug)] -#[cfg_attr( - feature = "datagen", - derive(databake::Bake), - databake(path = icu_segmenter::provider), -)] +#[cfg_attr(feature = "datagen", derive(databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_segmenter::provider))] /// Break state /// ///
diff --git a/components/timezone/src/provider.rs b/components/timezone/src/provider.rs index e8ecefbb9f7..9c08fafd595 100644 --- a/components/timezone/src/provider.rs +++ b/components/timezone/src/provider.rs @@ -64,7 +64,8 @@ pub const MARKERS: &[DataMarkerInfo] = &[ ///
#[repr(transparent)] #[derive(Debug, Clone, Copy, Eq, Ord, PartialEq, PartialOrd, yoke::Yokeable, ULE, Hash)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_timezone::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct TimeZoneBcp47Id(pub TinyAsciiStr<8>); @@ -106,7 +107,8 @@ impl<'a> zerovec::maps::ZeroMapKV<'a> for TimeZoneBcp47Id { /// #[repr(transparent)] #[derive(Debug, Clone, Copy, Eq, Ord, PartialEq, PartialOrd, yoke::Yokeable, ULE, Hash)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_timezone::provider))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct MetazoneId(pub TinyAsciiStr<4>); @@ -145,11 +147,8 @@ impl<'a> zerovec::maps::ZeroMapKV<'a> for MetazoneId { singleton ))] #[derive(PartialEq, Debug, Clone, Default)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_timezone::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct MetazonePeriodV1<'data>( diff --git a/components/timezone/src/provider/names.rs b/components/timezone/src/provider/names.rs index d2a1fef6f12..2f0c660eff3 100644 --- a/components/timezone/src/provider/names.rs +++ b/components/timezone/src/provider/names.rs @@ -32,11 +32,8 @@ use zerovec::{VarZeroVec, ZeroVec}; "time_zone/iana_to_bcp47@1", singleton ))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_timezone::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct IanaToBcp47MapV1<'data> { @@ -68,11 +65,8 @@ pub struct IanaToBcp47MapV1<'data> { "time_zone/iana_to_bcp47@2", singleton ))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_timezone::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct IanaToBcp47MapV2<'data> { /// A map from normal-case IANA time zone identifiers to indexes of BCP-47 time zone @@ -111,11 +105,8 @@ pub struct IanaToBcp47MapV2<'data> { "time_zone/bcp47_to_iana@1", singleton ))] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_timezone::provider::names), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone::provider::names))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[yoke(prove_covariance_manually)] pub struct Bcp47ToIanaMapV1<'data> { diff --git a/components/timezone/src/types.rs b/components/timezone/src/types.rs index fe8849b2eba..8b78f3bb2c4 100644 --- a/components/timezone/src/types.rs +++ b/components/timezone/src/types.rs @@ -185,7 +185,8 @@ impl FromStr for GmtOffset { /// such as Standard time, Daylight time, Summer time, or Ramadan time. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, ULE)] #[repr(transparent)] -#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_timezone))] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_timezone))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[allow(clippy::exhaustive_structs)] // newtype pub struct ZoneVariant(pub TinyAsciiStr<2>); diff --git a/documents/process/writing_a_new_data_struct.md b/documents/process/writing_a_new_data_struct.md index 6a19b793f55..7563bd03100 100644 --- a/documents/process/writing_a_new_data_struct.md +++ b/documents/process/writing_a_new_data_struct.md @@ -97,11 +97,8 @@ use icu::decimal::provider::{ AffixesV1, GroupingSizesV1 }; /// Symbols and metadata required for formatting a [`FixedDecimal`](crate::FixedDecimal). #[icu_provider::data_struct(DecimalSymbolsV1Marker = "decimal/symbols@1")] #[derive(Debug, PartialEq, Clone)] -#[cfg_attr( - feature = "datagen", - derive(serde::Serialize, databake::Bake), - databake(path = icu_decimal::provider), -)] +#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))] +#[cfg_attr(feature = "datagen", databake(path = icu_decimal::provider))] #[cfg_attr(feature = "serde", derive(serde::Deserialize))] pub struct DecimalSymbolsV1<'data> { /// Prefix and suffix to apply when a negative sign is needed. diff --git a/utils/pattern/tests/derive_test.rs b/utils/pattern/tests/derive_test.rs index 86168bc04f5..1a41a56df7a 100644 --- a/utils/pattern/tests/derive_test.rs +++ b/utils/pattern/tests/derive_test.rs @@ -13,7 +13,8 @@ use icu_pattern::{Pattern, SinglePlaceholder}; #[cfg_attr(feature = "yoke", derive(yoke::Yokeable))] #[cfg_attr(feature = "zerofrom", derive(zerofrom::ZeroFrom))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = crate))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = crate))] #[derive(Debug, PartialEq)] struct DeriveTest_SinglePlaceholderPattern_Cow<'data> { #[cfg_attr(feature = "serde", serde(borrow))] diff --git a/utils/zerotrie/src/zerotrie.rs b/utils/zerotrie/src/zerotrie.rs index dc94b5dfc74..21d6b430de2 100644 --- a/utils/zerotrie/src/zerotrie.rs +++ b/utils/zerotrie/src/zerotrie.rs @@ -111,7 +111,8 @@ pub(crate) enum ZeroTrieFlavor { /// ``` #[repr(transparent)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerotrie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = zerotrie))] #[allow(clippy::exhaustive_structs)] // databake hidden fields pub struct ZeroTrieSimpleAscii { #[doc(hidden)] // for databake, but there are no invariants @@ -168,7 +169,8 @@ impl ZeroTrieSimpleAscii { /// ``` #[repr(transparent)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerotrie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = zerotrie))] #[allow(clippy::exhaustive_structs)] // databake hidden fields pub struct ZeroAsciiIgnoreCaseTrie { #[doc(hidden)] // for databake, but there are no invariants @@ -203,7 +205,8 @@ pub struct ZeroAsciiIgnoreCaseTrie { /// ``` #[repr(transparent)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerotrie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = zerotrie))] #[allow(clippy::exhaustive_structs)] // databake hidden fields pub struct ZeroTriePerfectHash { #[doc(hidden)] // for databake, but there are no invariants @@ -223,7 +226,8 @@ impl ZeroTriePerfectHash { /// For more information, see [`ZeroTrie`]. #[repr(transparent)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerotrie))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = zerotrie))] #[allow(clippy::exhaustive_structs)] // databake hidden fields pub struct ZeroTrieExtendedCapacity { #[doc(hidden)] // for databake, but there are no invariants diff --git a/utils/zerotrie/tests/derive_test.rs b/utils/zerotrie/tests/derive_test.rs index 41ec8d51300..26ee36ab83c 100644 --- a/utils/zerotrie/tests/derive_test.rs +++ b/utils/zerotrie/tests/derive_test.rs @@ -14,7 +14,8 @@ use zerovec::ZeroVec; #[cfg_attr(feature = "yoke", derive(yoke::Yokeable))] #[cfg_attr(feature = "zerofrom", derive(zerofrom::ZeroFrom))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = crate))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = crate))] struct DeriveTest_ZeroTrie_ZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: ZeroTrie>, @@ -39,7 +40,8 @@ fn bake_ZeroTrie_ZeroVec() { #[cfg_attr(feature = "yoke", derive(yoke::Yokeable))] #[cfg_attr(feature = "zerofrom", derive(zerofrom::ZeroFrom))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = crate))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = crate))] struct DeriveTest_ZeroTrieSimpleAscii_ZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: ZeroTrieSimpleAscii>, @@ -63,7 +65,8 @@ fn bake_ZeroTrieSimpleAscii_ZeroVec() { #[cfg_attr(feature = "yoke", derive(yoke::Yokeable))] #[cfg_attr(feature = "zerofrom", derive(zerofrom::ZeroFrom))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = crate))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = crate))] struct DeriveTest_ZeroAsciiIgnoreCaseTrie_ZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: ZeroAsciiIgnoreCaseTrie>, @@ -87,7 +90,8 @@ fn bake_ZeroAsciiIgnoreCaseTrie_ZeroVec() { #[cfg_attr(feature = "yoke", derive(yoke::Yokeable))] #[cfg_attr(feature = "zerofrom", derive(zerofrom::ZeroFrom))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = crate))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = crate))] struct DeriveTest_ZeroTriePerfectHash_ZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: ZeroTriePerfectHash>, @@ -111,7 +115,8 @@ fn bake_ZeroTriePerfectHash_ZeroVec() { #[cfg_attr(feature = "yoke", derive(yoke::Yokeable))] #[cfg_attr(feature = "zerofrom", derive(zerofrom::ZeroFrom))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = crate))] +#[cfg_attr(feature = "databake", derive(databake::Bake))] +#[cfg_attr(feature = "databake", databake(path = crate))] struct DeriveTest_ZeroTrieExtendedCapacity_ZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: ZeroTrieExtendedCapacity>, diff --git a/utils/zerovec/src/yoke_impls.rs b/utils/zerovec/src/yoke_impls.rs index b91b2d66f57..9621478567a 100644 --- a/utils/zerovec/src/yoke_impls.rs +++ b/utils/zerovec/src/yoke_impls.rs @@ -302,7 +302,8 @@ mod test { #[derive(yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] struct DeriveTest_ZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: ZeroVec<'data, u16>, @@ -321,7 +322,8 @@ mod test { #[derive(yoke::Yokeable)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] struct DeriveTest_ZeroSlice<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: &'data ZeroSlice, @@ -340,7 +342,8 @@ mod test { #[derive(yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] struct DeriveTest_FlexZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: FlexZeroVec<'data>, @@ -359,7 +362,8 @@ mod test { #[derive(yoke::Yokeable)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] struct DeriveTest_FlexZeroSlice<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: &'data FlexZeroSlice, @@ -378,7 +382,8 @@ mod test { #[derive(yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] struct DeriveTest_VarZeroVec<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: VarZeroVec<'data, str>, @@ -397,7 +402,8 @@ mod test { #[derive(yoke::Yokeable)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] struct DeriveTest_VarZeroSlice<'data> { #[cfg_attr(feature = "serde", serde(borrow))] _data: &'data VarZeroSlice, @@ -416,7 +422,8 @@ mod test { #[derive(yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] #[yoke(prove_covariance_manually)] struct DeriveTest_ZeroMap<'data> { #[cfg_attr(feature = "serde", serde(borrow))] @@ -442,7 +449,8 @@ mod test { #[derive(yoke::Yokeable)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] #[yoke(prove_covariance_manually)] struct DeriveTest_ZeroMapBorrowed<'data> { #[cfg_attr(feature = "serde", serde(borrow))] @@ -468,7 +476,8 @@ mod test { #[derive(yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] #[yoke(prove_covariance_manually)] struct DeriveTest_ZeroMapWithULE<'data> { #[cfg_attr(feature = "serde", serde(borrow))] @@ -494,7 +503,8 @@ mod test { #[derive(yoke::Yokeable, zerofrom::ZeroFrom)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] #[yoke(prove_covariance_manually)] struct DeriveTest_ZeroMap2d<'data> { #[cfg_attr(feature = "serde", serde(borrow))] @@ -522,7 +532,8 @@ mod test { #[derive(yoke::Yokeable)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] - #[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = zerovec::yoke_impls::test))] + #[cfg_attr(feature = "databake", derive(databake::Bake))] + #[cfg_attr(feature = "databake", databake(path = zerovec::yoke_impls::test))] #[yoke(prove_covariance_manually)] struct DeriveTest_ZeroMap2dBorrowed<'data> { #[cfg_attr(feature = "serde", serde(borrow))]