Skip to content

Commit

Permalink
Rustdoc: added brief colon explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
zedddie16 committed Nov 2, 2024
1 parent 771d77c commit 81b20e0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions alloc/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@
//! parameters (corresponding to `format_spec` in [the syntax](#syntax)). These
//! 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
//!
//! ```
Expand Down

0 comments on commit 81b20e0

Please sign in to comment.