Rustdoc: added brief colon explanation
This commit is contained in:
parent
00ed73cdc0
commit
c7b07d58c3
1 changed files with 10 additions and 0 deletions
|
@ -109,6 +109,16 @@
|
||||||
//! parameters (corresponding to `format_spec` in [the syntax](#syntax)). These
|
//! parameters (corresponding to `format_spec` in [the syntax](#syntax)). These
|
||||||
//! parameters affect the string representation of what's being formatted.
|
//! parameters affect the string representation of what's being formatted.
|
||||||
//!
|
//!
|
||||||
|
//! The colon `:` in format syntax divides indentifier of the input data and
|
||||||
|
//! the formatting options, the colon itself does not change anything, only
|
||||||
|
//! introduces the options.
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
//! let a = 5;
|
||||||
|
//! let b = &a;
|
||||||
|
//! println!("{a:e} {b:p}"); // => 5e0 0x7ffe37b7273c
|
||||||
|
//! ```
|
||||||
|
//!
|
||||||
//! ## Width
|
//! ## Width
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue