Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for std::fmt could mention locale #69681

Closed
ExpHP opened this issue Mar 3, 2020 · 1 comment · Fixed by #69861
Closed

Docs for std::fmt could mention locale #69681

ExpHP opened this issue Mar 3, 2020 · 1 comment · Fixed by #69861
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ExpHP
Copy link
Contributor

ExpHP commented Mar 3, 2020

From this discussion: https://users.rust-lang.org/t/is-f64-to-string-localized/39011

dan5sch:
On this subject: looking into this question, I was surprised how hard it was to get an up-or-down answer from the standard library documentation. Even a detailed page like the module-level documentation for std::fmt doesn't appear to mention the existence of locale-specific conventions and clarify that Rust doesn't vary behavior by locale, when this is a natural question coming from other languages.

ExpHP:
The concept of a "locale" doesn't even exist in Rust. That's an operating system concept, whereas rust is the sort of language that can be used to write operating systems.

At present, even the standard library of Rust (where abstractions over the operating system go) does not expose an interface for working with locales.

dan5sch:
To put my first comment another way: I'm surprised the module documentation doesn't bring up the subject and say what you said directly, when many people like OP will wonder about this.

Yeah, it should probably be mentioned, to give users something to Ctrl+F for.

@Centril Centril added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Mar 3, 2020
@jonas-schievink jonas-schievink added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Mar 6, 2020
@dylnuge
Copy link
Contributor

dylnuge commented Mar 6, 2020

I'm happy to take a pass at this; is a cautionary note in https://doc.rust-lang.org/std/fmt/ the right place or is there somewhere better for it to be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants