-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Labels
C-metaComponent: Relating to ICU4X as a wholeComponent: Relating to ICU4X as a whole
Milestone
Description
I would expect the code below to work:
use icu::locale::locale;
use icu::datetime::fieldsets::YMD;
use icu::datetime::DateTimeFormatter;
use icu::segmenter::WordSegmenter;
fn main() {
let _formatter = DateTimeFormatter::try_new(
locale!("en").into(),
YMD::medium()
);
let _segmenter = WordSegmenter::try_new_auto(
locale!("en").into()
);
}But it fails with
error[E0277]: the trait bound `WordBreakOptions<'_>: From<Locale>` is not satisfied
--> src\main.rs:15:9
|
15 | locale!("en").into()
| ^^^^^^^^^^^^^ ---- required by a bound introduced by this call
| |
| the trait `From<Locale>` is not implemented for `WordBreakOptions<'_>`
|
= note: required for `Locale` to implement `Into<WordBreakOptions<'_>>`
Metadata
Metadata
Assignees
Labels
C-metaComponent: Relating to ICU4X as a wholeComponent: Relating to ICU4X as a whole