about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNik Revenco <pm@nikrev.com>2025-07-13 23:24:27 +0100
committerGitHub <noreply@github.com>2025-07-13 23:24:27 +0100
commitf5485e55644cea6395fb2196b915dee1b48f6427 (patch)
treec1613301517cf3662eb39d732eb673a92e0ab161
parente9182f195b8505c87c4bd055b9f6e114ccda0981 (diff)
downloadrust-f5485e55644cea6395fb2196b915dee1b48f6427.tar.gz
rust-f5485e55644cea6395fb2196b915dee1b48f6427.zip
docs(alloc::fmt): Make `type` optional, instead of matching the empty string
-rw-r--r--library/alloc/src/fmt.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs
index 30f42050ac8..d0ba9c39886 100644
--- a/library/alloc/src/fmt.rs
+++ b/library/alloc/src/fmt.rs
@@ -348,13 +348,13 @@
 //! format := '{' [ argument ] [ ':' format_spec ] [ ws ] * '}'
 //! argument := integer | identifier
 //!
-//! format_spec := [[fill]align][sign]['#']['0'][width]['.' precision]type
+//! format_spec := [[fill]align][sign]['#']['0'][width]['.' precision][type]
 //! fill := character
 //! align := '<' | '^' | '>'
 //! sign := '+' | '-'
 //! width := count
 //! precision := count | '*'
-//! type := '' | '?' | 'x?' | 'X?' | identifier
+//! type := '?' | 'x?' | 'X?' | identifier
 //! count := parameter | integer
 //! parameter := argument '$'
 //! ```