Skip to content

Commit 6c08d7f

Browse files
authored
Delete old neo skeleton structs (#5807)
#1317
1 parent 4a69b15 commit 6c08d7f

File tree

8 files changed

+131
-1429
lines changed

8 files changed

+131
-1429
lines changed

components/datetime/src/combo.rs

+10-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use core::marker::PhantomData;
66

7-
use crate::{format::neo::*, neo_skeleton::*, provider::neo::*, scaffold::*};
7+
use crate::{format::neo::*, provider::neo::*, scaffold::*};
88

99
/// Struct for combining date/time fields with zone fields.
1010
///
@@ -24,11 +24,10 @@ use crate::{format::neo::*, neo_skeleton::*, provider::neo::*, scaffold::*};
2424
/// use icu::timezone::IxdtfParser;
2525
/// use writeable::assert_try_writeable_eq;
2626
///
27-
/// let field_set: Combo<ET, L> = ET::short().hm().l();
28-
///
29-
/// let formatter = DateTimeFormatter::try_new(
27+
/// // Note: Combo type can be elided, but it is shown here for demonstration
28+
/// let formatter = DateTimeFormatter::<Combo<ET, L>>::try_new(
3029
/// &locale!("en-US").into(),
31-
/// field_set,
30+
/// ET::short().hm().l(),
3231
/// )
3332
/// .unwrap();
3433
///
@@ -53,11 +52,10 @@ use crate::{format::neo::*, neo_skeleton::*, provider::neo::*, scaffold::*};
5352
/// use icu::timezone::IxdtfParser;
5453
/// use writeable::assert_try_writeable_eq;
5554
///
56-
/// let field_set: Combo<ET, L> = ET::short().hm().l();
57-
///
58-
/// let formatter = FixedCalendarDateTimeFormatter::try_new(
55+
/// // Note: Combo type can be elided, but it is shown here for demonstration
56+
/// let formatter = FixedCalendarDateTimeFormatter::<_, Combo<ET, L>>::try_new(
5957
/// &locale!("en-US").into(),
60-
/// field_set,
58+
/// ET::short().hm().l(),
6159
/// )
6260
/// .unwrap();
6361
///
@@ -77,13 +75,14 @@ use crate::{format::neo::*, neo_skeleton::*, provider::neo::*, scaffold::*};
7775
/// with a static time zone:
7876
///
7977
/// ```
80-
/// use icu::datetime::fieldset::{YMD, dynamic::DateFieldSet};
78+
/// use icu::datetime::fieldset::{Combo, YMD, Vs, dynamic::DateFieldSet};
8179
/// use icu::datetime::DateTimeFormatter;
8280
/// use icu::locale::locale;
8381
/// use icu::timezone::IxdtfParser;
8482
/// use writeable::assert_try_writeable_eq;
8583
///
86-
/// let formatter = DateTimeFormatter::try_new(
84+
/// // Note: Combo type can be elided, but it is shown here for demonstration
85+
/// let formatter = DateTimeFormatter::<Combo<DateFieldSet, Vs>>::try_new(
8786
/// &locale!("en-US").into(),
8887
/// DateFieldSet::YMD(YMD::long()).v(),
8988
/// )
@@ -150,9 +149,5 @@ where
150149
type D = DT::D;
151150
type T = DT::T;
152151
type Z = Z::Z;
153-
type LengthOption = NeoSkeletonLength; // always needed for date
154-
type AlignmentOption = DT::AlignmentOption;
155-
type YearStyleOption = DT::YearStyleOption;
156-
type TimePrecisionOption = DT::TimePrecisionOption;
157152
type GluePatternV1Marker = datetime_marker_helper!(@glue, yes);
158153
}

components/datetime/src/fieldset.rs

-16
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,6 @@ macro_rules! impl_date_or_calendar_period_marker {
427427
type D = Self;
428428
type T = NeoNeverMarker;
429429
type Z = NeoNeverMarker;
430-
type LengthOption = datetime_marker_helper!(@option/length, $sample_length);
431-
type AlignmentOption = datetime_marker_helper!(@option/alignment, $($months_yes)?);
432-
type YearStyleOption = datetime_marker_helper!(@option/yearstyle, $($year_yes)?);
433-
type TimePrecisionOption = datetime_marker_helper!(@option/timeprecision,);
434430
type GluePatternV1Marker = datetime_marker_helper!(@glue,);
435431
}
436432
};
@@ -589,10 +585,6 @@ macro_rules! impl_date_marker {
589585
type D = Self;
590586
type T = Self;
591587
type Z = NeoNeverMarker;
592-
type LengthOption = datetime_marker_helper!(@option/length, $sample_length);
593-
type AlignmentOption = datetime_marker_helper!(@option/alignment, $($months_yes)?);
594-
type YearStyleOption = datetime_marker_helper!(@option/yearstyle, $($year_yes)?);
595-
type TimePrecisionOption = datetime_marker_helper!(@option/timeprecision, yes);
596588
type GluePatternV1Marker = datetime_marker_helper!(@glue, yes);
597589
}
598590
impl_composite!($type_time, DateTime, DateAndTimeFieldSet);
@@ -763,10 +755,6 @@ macro_rules! impl_time_marker {
763755
type D = NeoNeverMarker;
764756
type T = Self;
765757
type Z = NeoNeverMarker;
766-
type LengthOption = datetime_marker_helper!(@option/length, $sample_length);
767-
type AlignmentOption = datetime_marker_helper!(@option/alignment, yes);
768-
type YearStyleOption = datetime_marker_helper!(@option/yearstyle,);
769-
type TimePrecisionOption = datetime_marker_helper!(@option/timeprecision, yes);
770758
type GluePatternV1Marker = datetime_marker_helper!(@glue,);
771759
}
772760
impl_composite!($type, Time, TimeFieldSet);
@@ -924,10 +912,6 @@ macro_rules! impl_zone_marker {
924912
type D = NeoNeverMarker;
925913
type T = NeoNeverMarker;
926914
type Z = Self;
927-
type LengthOption = datetime_marker_helper!(@option/length, yes);
928-
type AlignmentOption = datetime_marker_helper!(@option/alignment,);
929-
type YearStyleOption = datetime_marker_helper!(@option/yearstyle,);
930-
type TimePrecisionOption = datetime_marker_helper!(@option/timeprecision,);
931915
type GluePatternV1Marker = datetime_marker_helper!(@glue,);
932916
}
933917
$(

0 commit comments

Comments
 (0)