Skip to content

Commit d75c76d

Browse files
committed
Update crate documentation of rustc_baked_icu_data crate
1 parent ecaf5f7 commit d75c76d

File tree

1 file changed

+20
-21
lines changed
  • compiler/rustc_baked_icu_data/src

1 file changed

+20
-21
lines changed

compiler/rustc_baked_icu_data/src/lib.rs

+20-21
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
//! Baked ICU data for eager translation support.
1+
//! This crate contains pre-baked ICU4X data, generated by `icu4x-datagen`. The tool
2+
//! fetches locale data from CLDR and transforms them into const code in statics that
3+
//! ICU4X can load, via databake. `lib.rs` in this crate is manually written, but all
4+
//! other code is generated.
25
//!
6+
//! This crate can be regenerated when there's a new CLDR version, though that is unlikely
7+
//! to result in changes in most cases (currently this only covers list formatting data, which
8+
//! is rather stable). It may need to be regenerated when updating ICU4X versions, especially
9+
//! across major versions, in case it fails to compile after an update.
10+
//!
11+
//! It must be regenerated when adding new locales to Rust, or if Rust's usage of ICU4X
12+
//! grows to need more kinds of data.
13+
//!
14+
//! To regenerate the data, run this command:
15+
//!
16+
//! ```text
17+
//! icu4x-datagen -W --pretty --fingerprint --use-separate-crates \
18+
//! --format mod -l en es fr it ja pt ru tr zh zh-Hans zh-Hant \
19+
//! -k list/and@1 fallback/likelysubtags@1 fallback/parents@1 fallback/supplement/co@1 \
20+
//! --cldr-tag latest --icuexport-tag latest -o src/data
21+
//! ```
322
#![allow(elided_lifetimes_in_paths)]
423

5-
/* generated with:
6-
```text
7-
icu4x-datagen -W --pretty --fingerprint --use-separate-crates --cldr-tag latest --icuexport-tag latest \
8-
--format mod -l en es fr it ja pt ru tr zh zh-Hans zh-Hant -k list/and@1 fallback/likelysubtags@1 fallback/parents@1 fallback/supplement/co@1 \
9-
-o src/data
10-
```
11-
*/
12-
13-
// FIXME: Workaround https://github.com/unicode-org/icu4x/issues/2815
1424
mod data {
15-
/*
16-
use super::data::BakedDataProvider;
17-
use icu_provider::{
18-
AnyPayload, AnyProvider, AnyResponse, DataError, DataErrorKind, DataKey, DataRequest,
19-
KeyedDataMarker,
20-
};
21-
22-
use crate::data::fallback;
23-
use crate::data::list;
24-
*/
25-
2625
include!("data/mod.rs");
2726
include!("data/any.rs");
2827
}

0 commit comments

Comments
 (0)