diff options
| author | Nik Revenco <pm@nikrev.com> | 2025-07-13 23:24:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-13 23:24:27 +0100 |
| commit | f5485e55644cea6395fb2196b915dee1b48f6427 (patch) | |
| tree | c1613301517cf3662eb39d732eb673a92e0ab161 | |
| parent | e9182f195b8505c87c4bd055b9f6e114ccda0981 (diff) | |
| download | rust-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.rs | 4 |
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 '$' //! ``` |
