Skip to content

Commit 38139e2

Browse files
committed
Rustdoc: added brief colon explanation
1 parent c8b8378 commit 38139e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/alloc/src/fmt.rs

+10
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@
109109
//! parameters (corresponding to `format_spec` in [the syntax](#syntax)). These
110110
//! parameters affect the string representation of what's being formatted.
111111
//!
112+
//! The colon `:` in format syntax divides indentifier of the input data
113+
//! and the formatting options, the colon itself does not change anything, only introduces
114+
//! the options.
115+
//!
116+
//! ```
117+
//! let a = 5;
118+
//! let b = &a;
119+
//! println!("{a:e}{b:p}");
120+
//! ```
121+
//!
112122
//! ## Width
113123
//!
114124
//! ```

0 commit comments

Comments
 (0)