about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-05-29 15:06:59 +0900
committerGitHub <noreply@github.com>2020-05-29 15:06:59 +0900
commit6ab9f65a92361e3b5ad77554719add837ff1b0db (patch)
treec00e9526acd2eb2518fd9941addab12e2307219f
parent986c60c78b4aa548aa78570a08b2c51bc16dcbb7 (diff)
parent526dbd3d9718bf55a4d900bb68a9abff2be7019a (diff)
downloadrust-6ab9f65a92361e3b5ad77554719add837ff1b0db.tar.gz
rust-6ab9f65a92361e3b5ad77554719add837ff1b0db.zip
Rollup merge of #72452 - Lucretiel:precision-doc, r=dtolnay
Clarified the documentation for Formatter::precision

Added a note that `precision` is interpreted as max-width when formatting strings
-rw-r--r--src/libcore/fmt/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 3d90fe1fa2f..9c5dbb5e6f3 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -1618,7 +1618,8 @@ impl<'a> Formatter<'a> {
         self.width
     }
 
-    /// Optionally specified precision for numeric types.
+    /// Optionally specified precision for numeric types. Alternatively, the
+    /// maximum width for string types.
     ///
     /// # Examples
     ///