Skip to content

std::fmt documentation does not explain the colon #131865

New issue

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

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

Already on GitHub? # to your account

Closed
kpreid opened this issue Oct 18, 2024 · 3 comments
Closed

std::fmt documentation does not explain the colon #131865

kpreid opened this issue Oct 18, 2024 · 3 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-fmt Area: `core::fmt` T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@kpreid
Copy link
Contributor

kpreid commented Oct 18, 2024

Location

https://doc.rust-lang.org/std/fmt/

Summary

The documentation of format strings uses the colon “:” without ever explaining what its role is. To some it will be obvious, but others will benefit from a brief explanation of the general syntax principle: that everything to the left of the “:” is the identifier of the input data, everything to the right is formatting options, and the colon per se does not change anything at all but only introduces the options.

@rustbot label +A-fmt

@kpreid kpreid added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Oct 18, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-fmt Area: `core::fmt` labels Oct 18, 2024
@jieyouxu jieyouxu added T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 18, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Nov 2, 2024
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Nov 3, 2024
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Nov 3, 2024
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 3, 2024
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 3, 2024
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 3, 2024
Rollup merge of rust-lang#132393 - zedddie16:issue-131865-fix, r=tgross35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
@lolbinarycat
Copy link
Contributor

triage: fixed in #132393, cant add unit tests for docs, closing as completed.

@hkBst
Copy link
Member

hkBst commented Jan 22, 2025

@kpreid if this is fixed, can you close this?

@lolbinarycat
Copy link
Contributor

i can

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-fmt Area: `core::fmt` T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants