Skip to content

Conversation

@sffc
Copy link
Member

@sffc sffc commented Jan 6, 2026

Extracted from #7346

We want these docs to be good especially with #7348

3.0 follow-up: #7381

@sffc sffc requested review from nciric and zbraniecki as code owners January 6, 2026 21:38
@sffc sffc requested review from robertbastian and removed request for nciric January 6, 2026 21:38
Comment on lines 36 to 38
/// // When directly converted, -u-rg is implicitly dropped
/// let data_locale = DataLocale::from(&locale);
/// assert_writeable_eq!(data_locale, "en-US");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: frame this as a feature, not a bug. if move this below the preference examples, then you can say "Direct conversion behaves like language-priority fallback", as that was already explained

/// You can create a [`DataLocale`] from a borrowed [`Locale`], which is more
/// efficient than cloning the [`Locale`], but less efficient than converting an owned
/// [`Locale`]:
/// In general, you should not need to construct one of these directly. If you do,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you ever see this type, it's very likely that you need to construct one (because you're inside ICU4X).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's in the public API of LocaleFallbacker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants