Skip to content

Commit

Permalink
Rollup merge of #132393 - zedddie16:issue-131865-fix, r=tgross35
Browse files Browse the repository at this point in the history
Docs: added brief colon explanation

#131865
(this is my first attempt at contributing, feedback is welcome)
  • Loading branch information
matthiaskrgr authored Nov 3, 2024
2 parents b9f9727 + c7b07d5 commit e522d08
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 e522d08

Please sign in to comment.