Rollup merge of #143909 - nik-rev:patch-1, r=jhpratt
docs(alloc::fmt): Make type optional, instead of matching empty string Think this is clearer. Noticed as I was implementing [`tree-sitter-rust-format-args`](https://github.com/nik-rev/tree-sitter-rust-format-args), and attempting to match the empty string results in an error.
This commit is contained in:
commit
744ca5959a
1 changed files with 2 additions and 2 deletions
|
|
@ -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 '$'
|
||||
//! ```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue