Skip to content

Commit b935818

Browse files
authored
Get rid of cfg(skip) (#5076)
It was a hack and it breaks rustc-check-cfg, let's not do that anymore. This is based on #5075 so that I can test this works with beta/nightly
1 parent 80b8174 commit b935818

File tree

30 files changed

+103
-121
lines changed

30 files changed

+103
-121
lines changed

components/calendar/src/any_calendar.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,8 @@ impl AnyCalendar {
756756

757757
icu_provider::gen_any_buffer_data_constructors!(
758758
(locale) -> error: DataError,
759-
#[cfg(skip)]
760759
functions: [
761-
new_for_locale,
760+
new_for_locale: skip,
762761
try_new_for_locale_with_any_provider,
763762
try_new_for_locale_with_buffer_provider,
764763
try_new_for_locale_unstable,

components/calendar/src/chinese.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,8 @@ impl Chinese {
160160
}
161161

162162
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
163-
#[cfg(skip)]
164163
functions: [
165-
new,
164+
new: skip,
166165
try_new_with_any_provider,
167166
try_new_with_buffer_provider,
168167
try_new_unstable,

components/calendar/src/dangi.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ impl Dangi {
153153
}
154154

155155
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
156-
#[cfg(skip)]
157156
functions: [
158-
new,
157+
new: skip,
159158
try_new_with_any_provider,
160159
try_new_with_buffer_provider,
161160
try_new_unstable,

components/calendar/src/islamic.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ impl IslamicObservational {
128128
}
129129

130130
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
131-
#[cfg(skip)]
132131
functions: [
133-
new,
132+
new: skip,
134133
try_new_with_any_provider,
135134
try_new_with_buffer_provider,
136135
try_new_unstable,
@@ -175,9 +174,8 @@ impl IslamicUmmAlQura {
175174
}
176175

177176
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
178-
#[cfg(skip)]
179177
functions: [
180-
new,
178+
new: skip,
181179
try_new_with_any_provider,
182180
try_new_with_buffer_provider,
183181
try_new_unstable,

components/calendar/src/japanese.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ impl Japanese {
130130
}
131131

132132
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
133-
#[cfg(skip)]
134133
functions: [
135-
new,
134+
new: skip,
136135
try_new_with_any_provider,
137136
try_new_with_buffer_provider,
138137
try_new_unstable,
@@ -188,9 +187,8 @@ impl JapaneseExtended {
188187
}
189188

190189
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
191-
#[cfg(skip)]
192190
functions: [
193-
new,
191+
new: skip,
194192
try_new_with_any_provider,
195193
try_new_with_buffer_provider,
196194
try_new_unstable,

components/casemap/src/casemapper.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ impl CaseMapper {
8181
}
8282

8383
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
84-
#[cfg(skip)]
8584
functions: [
86-
new,
85+
new: skip,
8786
try_new_with_any_provider,
8887
try_new_with_buffer_provider,
8988
try_new_unstable,

components/casemap/src/closer.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ impl CaseMapCloser<CaseMapper> {
8888
}
8989

9090
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
91-
#[cfg(skip)]
9291
functions: [
93-
new,
92+
new: skip,
9493
try_new_with_any_provider,
9594
try_new_with_buffer_provider,
9695
try_new_unstable,
@@ -111,9 +110,8 @@ impl CaseMapCloser<CaseMapper> {
111110
// We use Borrow, not AsRef, since we want the blanket impl on T
112111
impl<CM: AsRef<CaseMapper>> CaseMapCloser<CM> {
113112
icu_provider::gen_any_buffer_data_constructors!((casemapper: CM) -> error: DataError,
114-
#[cfg(skip)]
115113
functions: [
116-
new_with_mapper,
114+
new_with_mapper: skip,
117115
try_new_with_mapper_with_any_provider,
118116
try_new_with_mapper_with_buffer_provider,
119117
try_new_with_mapper_unstable,

components/casemap/src/titlecase.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,8 @@ impl TitlecaseMapper<CaseMapper> {
226226
}
227227

228228
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
229-
#[cfg(skip)]
230229
functions: [
231-
new,
230+
new: skip,
232231
try_new_with_any_provider,
233232
try_new_with_buffer_provider,
234233
try_new_unstable,
@@ -249,9 +248,8 @@ impl TitlecaseMapper<CaseMapper> {
249248
// We use Borrow, not AsRef, since we want the blanket impl on T
250249
impl<CM: AsRef<CaseMapper>> TitlecaseMapper<CM> {
251250
icu_provider::gen_any_buffer_data_constructors!((casemapper: CM) -> error: DataError,
252-
#[cfg(skip)]
253251
functions: [
254-
new_with_mapper,
252+
new_with_mapper: skip,
255253
try_new_with_mapper_with_any_provider,
256254
try_new_with_mapper_with_buffer_provider,
257255
try_new_with_mapper_unstable,

components/collator/src/comparison.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ impl Collator {
9393

9494
icu_provider::gen_any_buffer_data_constructors!(
9595
(locale, options: CollatorOptions) -> error: DataError,
96-
#[cfg(skip)]
96+
functions: [
97+
try_new: skip,
98+
try_new_with_any_provider,
99+
try_new_with_buffer_provider,
100+
try_new_unstable,
101+
Self
102+
]
97103
);
98104

99105
#[doc = icu_provider::gen_any_buffer_unstable_docs!(UNSTABLE, Self::try_new)]

components/datetime/src/datetime.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ impl TimeFormatter {
100100

101101
icu_provider::gen_any_buffer_data_constructors!(
102102
(locale, length: length::Time) -> error: DateTimeError,
103-
#[cfg(skip)]
104103
functions: [
105-
try_new_with_length,
104+
try_new_with_length: skip,
106105
try_new_with_length_with_any_provider,
107106
try_new_with_length_with_buffer_provider,
108107
try_new_with_length_unstable,
@@ -310,9 +309,8 @@ impl<C: CldrCalendar> TypedDateFormatter<C> {
310309

311310
icu_provider::gen_any_buffer_data_constructors!(
312311
(locale, length: length::Date) -> error: DateTimeError,
313-
#[cfg(skip)]
314312
functions: [
315-
try_new_with_length,
313+
try_new_with_length: skip,
316314
try_new_with_length_with_any_provider,
317315
try_new_with_length_with_buffer_provider,
318316
try_new_with_length_unstable,
@@ -562,9 +560,8 @@ where {
562560

563561
icu_provider::gen_any_buffer_data_constructors!(
564562
(locale, options: DateTimeFormatterOptions) -> error: DateTimeError,
565-
#[cfg(skip)]
566563
functions: [
567-
try_new,
564+
try_new: skip,
568565
try_new_with_any_provider,
569566
try_new_with_buffer_provider,
570567
try_new_unstable,

components/datetime/src/zoned_datetime.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,13 @@ impl<C: CldrCalendar> TypedZonedDateTimeFormatter<C> {
161161
icu_provider::gen_any_buffer_data_constructors!(
162162

163163
(locale, date_time_format_options: DateTimeFormatterOptions, time_zone_format_options: TimeZoneFormatterOptions) -> error: DateTimeError,
164-
#[cfg(skip)]
164+
functions: [
165+
try_new: skip,
166+
try_new_with_any_provider,
167+
try_new_with_buffer_provider,
168+
try_new_unstable,
169+
Self
170+
]
165171
);
166172

167173
#[doc = icu_provider::gen_any_buffer_unstable_docs!(UNSTABLE, Self::try_new)]

components/experimental/src/compactdecimal/compactdecimal.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ impl CompactDecimalFormatter {
143143

144144
icu_provider::gen_any_buffer_data_constructors!(
145145
(locale, options: CompactDecimalFormatterOptions) -> error: DataError,
146-
#[cfg(skip)]
147146
functions: [
148-
try_new_short,
147+
try_new_short: skip,
149148
try_new_short_with_any_provider,
150149
try_new_short_with_buffer_provider,
151150
try_new_short_unstable,
@@ -228,9 +227,8 @@ impl CompactDecimalFormatter {
228227

229228
icu_provider::gen_any_buffer_data_constructors!(
230229
(locale, options: CompactDecimalFormatterOptions) -> error: DataError,
231-
#[cfg(skip)]
232230
functions: [
233-
try_new_long,
231+
try_new_long: skip,
234232
try_new_long_with_any_provider,
235233
try_new_long_with_buffer_provider,
236234
try_new_long_unstable,

components/experimental/src/dimension/currency/formatter.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ pub struct CurrencyCode(pub TinyAsciiStr<3>);
4343
impl CurrencyFormatter {
4444
icu_provider::gen_any_buffer_data_constructors!(
4545
(locale, options: super::options::CurrencyFormatterOptions) -> error: DataError,
46-
#[cfg(skip)]
46+
functions: [
47+
try_new: skip,
48+
try_new_with_any_provider,
49+
try_new_with_buffer_provider,
50+
try_new_unstable,
51+
Self
52+
]
4753
);
4854

4955
/// Creates a new [`CurrencyFormatter`] from compiled locale data and an options bag.

components/experimental/src/relativetime/relativetime.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,8 @@ macro_rules! constructor {
144144

145145
icu_provider::gen_any_buffer_data_constructors!(
146146
(locale, options: RelativeTimeFormatterOptions) -> error: DataError,
147-
#[cfg(skip)]
148147
functions: [
149-
$baked,
148+
$baked: skip,
150149
$any,
151150
$buffer,
152151
$unstable,

components/experimental/src/units/converter_factory.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ impl From<Sign> for num_bigint::Sign {
4040
impl ConverterFactory {
4141
icu_provider::gen_any_buffer_data_constructors!(
4242
() -> error: DataError,
43-
#[cfg(skip)]
4443
functions: [
45-
new,
44+
new: skip,
4645
try_new_with_any_provider,
4746
try_new_with_buffer_provider,
4847
try_new_unstable,

components/locale/src/expander.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,8 @@ impl LocaleExpander {
285285
}
286286

287287
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
288-
#[cfg(skip)]
289288
functions: [
290-
new_extended,
289+
new_extended: skip,
291290
try_new_extended_with_any_provider,
292291
try_new_extended_with_buffer_provider,
293292
try_new_extended_unstable,

components/locale/src/fallback/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ impl LocaleFallbacker {
131131
}
132132

133133
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
134-
#[cfg(skip)]
135134
functions: [
136-
new,
135+
new: skip,
137136
try_new_with_any_provider,
138137
try_new_with_buffer_provider,
139138
try_new_unstable,

components/normalizer/src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,9 +1604,8 @@ impl DecomposingNormalizer {
16041604

16051605
icu_provider::gen_any_buffer_data_constructors!(
16061606
() -> error: DataError,
1607-
#[cfg(skip)]
16081607
functions: [
1609-
new_nfd,
1608+
new_nfd: skip,
16101609
try_new_nfd_with_any_provider,
16111610
try_new_nfd_with_buffer_provider,
16121611
try_new_nfd_unstable,
@@ -1719,9 +1718,8 @@ impl DecomposingNormalizer {
17191718

17201719
icu_provider::gen_any_buffer_data_constructors!(
17211720
() -> error: DataError,
1722-
#[cfg(skip)]
17231721
functions: [
1724-
new_nfkd,
1722+
new_nfkd: skip,
17251723
try_new_nfkd_with_any_provider,
17261724
try_new_nfkd_with_buffer_provider,
17271725
try_new_nfkd_unstable,
@@ -2221,9 +2219,8 @@ impl ComposingNormalizer {
22212219

22222220
icu_provider::gen_any_buffer_data_constructors!(
22232221
() -> error: DataError,
2224-
#[cfg(skip)]
22252222
functions: [
2226-
new_nfc,
2223+
new_nfc: skip,
22272224
try_new_nfc_with_any_provider,
22282225
try_new_nfc_with_buffer_provider,
22292226
try_new_nfc_unstable,
@@ -2267,9 +2264,8 @@ impl ComposingNormalizer {
22672264

22682265
icu_provider::gen_any_buffer_data_constructors!(
22692266
() -> error: DataError,
2270-
#[cfg(skip)]
22712267
functions: [
2272-
new_nfkc,
2268+
new_nfkc: skip,
22732269
try_new_nfkc_with_any_provider,
22742270
try_new_nfkc_with_buffer_provider,
22752271
try_new_nfkc_unstable,

components/normalizer/src/properties.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ impl CanonicalComposition {
9898
}
9999

100100
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
101-
#[cfg(skip)]
102101
functions: [
103-
new,
102+
new: skip,
104103
try_new_with_any_provider,
105104
try_new_with_buffer_provider,
106105
try_new_unstable,
@@ -390,9 +389,8 @@ impl CanonicalDecomposition {
390389
}
391390

392391
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
393-
#[cfg(skip)]
394392
functions: [
395-
new,
393+
new: skip,
396394
try_new_with_any_provider,
397395
try_new_with_buffer_provider,
398396
try_new_unstable,
@@ -498,9 +496,8 @@ impl CanonicalCombiningClassMap {
498496
}
499497

500498
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
501-
#[cfg(skip)]
502499
functions: [
503-
new,
500+
new: skip,
504501
try_new_with_any_provider,
505502
try_new_with_buffer_provider,
506503
try_new_unstable,

components/properties/src/bidi_data.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ pub const fn bidi_auxiliary_properties() -> BidiAuxiliaryPropertiesBorrowed<'sta
196196

197197
icu_provider::gen_any_buffer_data_constructors!(
198198
() -> result: Result<BidiAuxiliaryProperties, DataError>,
199-
#[cfg(skip)]
200199
functions: [
201-
bidi_auxiliary_properties,
200+
bidi_auxiliary_properties: skip,
202201
load_bidi_auxiliary_properties_with_any_provider,
203202
load_bidi_auxiliary_properties_with_buffer_provider,
204203
load_bidi_auxiliary_properties_unstable,

components/properties/src/script.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,8 @@ pub const fn script_with_extensions() -> ScriptWithExtensionsBorrowed<'static> {
625625

626626
icu_provider::gen_any_buffer_data_constructors!(
627627
() -> result: Result<ScriptWithExtensions, DataError>,
628-
#[cfg(skip)]
629628
functions: [
630-
script_with_extensions,
629+
script_with_extensions: skip,
631630
load_script_with_extensions_with_any_provider,
632631
load_script_with_extensions_with_buffer_provider,
633632
load_script_with_extensions_unstable,

components/properties/src/sets.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,9 +2110,8 @@ pub fn load_for_ecma262(
21102110

21112111
icu_provider::gen_any_buffer_data_constructors!(
21122112
(name: &str) -> result: Result<CodePointSetData, UnexpectedPropertyNameOrDataError>,
2113-
#[cfg(skip)]
21142113
functions: [
2115-
load_for_ecma262,
2114+
load_for_ecma262: skip,
21162115
load_for_ecma262_with_any_provider,
21172116
load_for_ecma262_with_buffer_provider,
21182117
load_for_ecma262_unstable,

components/segmenter/src/grapheme.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ impl GraphemeClusterSegmenter {
154154
}
155155

156156
icu_provider::gen_any_buffer_data_constructors!(() -> error: DataError,
157-
#[cfg(skip)]
158157
functions: [
159-
new,
158+
new: skip,
160159
try_new_with_any_provider,
161160
try_new_with_buffer_provider,
162161
try_new_unstable,

0 commit comments

Comments
 (0)