Skip to content

Commit

Permalink
Rollup merge of rust-lang#132393 - zedddie16:issue-131865-fix, r=tgro…
Browse files Browse the repository at this point in the history
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
  • Loading branch information
matthiaskrgr authored Nov 3, 2024
2 parents 979917c + c7b07d5 commit ff1b2fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/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 ff1b2fc

Please sign in to comment.