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
workingjubilee authored Nov 2, 2024
2 parents b3f75cc + c7b07d5 commit 6f1ff28
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 6f1ff28

Please sign in to comment.