about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-19 19:12:40 -0700
committerGitHub <noreply@github.com>2020-07-19 19:12:40 -0700
commite762f978e1d2e1ebce03bcbfa3850822595f22b0 (patch)
treebb44896ef42924a396c1f47ad004ebb78b65d161 /src/libcore
parent42f6ed40e85daae5228b05cc1e47234a1648d06d (diff)
parenta462e7c1d08ba0babd18a4a71d1833839c3cd52d (diff)
downloadrust-e762f978e1d2e1ebce03bcbfa3850822595f22b0.tar.gz
rust-e762f978e1d2e1ebce03bcbfa3850822595f22b0.zip
Rollup merge of #74523 - sollyucko:patch-1, r=Mark-Simulacrum
Improve documentation for `core::fmt` internals

The public interface of `core::fmt` is well-documented, but the internals have very minimal documentation.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/fmt/rt/v1.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/fmt/rt/v1.rs b/src/libcore/fmt/rt/v1.rs
index f6460470bfe..37202b2774d 100644
--- a/src/libcore/fmt/rt/v1.rs
+++ b/src/libcore/fmt/rt/v1.rs
@@ -33,9 +33,13 @@ pub enum Alignment {
     Unknown,
 }
 
+/// Used by [width](https://doc.rust-lang.org/std/fmt/#width) and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
 #[derive(Copy, Clone)]
 pub enum Count {
+    /// Specified with a literal number, stores the value
     Is(usize),
+    /// Specified using `$` and `*` syntaxes, stores the index into `args`
     Param(usize),
+    /// Not specified
     Implied,
 }