diff options
| author | bors <bors@rust-lang.org> | 2021-03-27 07:59:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-27 07:59:24 +0000 |
| commit | feaac19f1710ebcfecc783d51f52a9b0d8e998f5 (patch) | |
| tree | 44502d0676b2b73cc6c5c4377338d5309134d7ca /library/alloc/src | |
| parent | f811f14006fa46030f1af714f7d640580d3ad822 (diff) | |
| parent | 1b01e0d36a1498ffe69dad46168efbf762bf0bb8 (diff) | |
| download | rust-feaac19f1710ebcfecc783d51f52a9b0d8e998f5.tar.gz rust-feaac19f1710ebcfecc783d51f52a9b0d8e998f5.zip | |
Auto merge of #83547 - JohnTitor:rollup-qh7j6hg, r=JohnTitor
Rollup of 9 pull requests Successful merges: - #83239 (Remove/replace some outdated crates from the dependency tree) - #83328 (Fixes to inline assmebly tests) - #83343 (Simplify and fix byte skipping in format! string parser) - #83388 (Make # pretty print format easier to discover) - #83431 (Tell GitHub to highlight `config.toml.example` as TOML) - #83508 (Use the direct link to the platform support page) - #83511 (compiletest: handle llvm_version with suffix like "12.0.0libcxx") - #83524 (Document that the SocketAddr memory representation is not stable) - #83525 (fix doc comment for `ty::Dynamic`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/fmt.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index f9424b1d747..e765fa9d14c 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -19,6 +19,10 @@ //! format!("{value}", value=4); // => "4" //! format!("{} {}", 1, 2); // => "1 2" //! format!("{:04}", 42); // => "0042" with leading zeros +//! format!("{:#?}", (100, 200)); // => "( +//! // 100, +//! // 200, +//! // )" //! ``` //! //! From these, you can see that the first argument is a format string. It is @@ -163,7 +167,7 @@ //! * `-` - Currently not used //! * `#` - This flag indicates that the "alternate" form of printing should //! be used. The alternate forms are: -//! * `#?` - pretty-print the [`Debug`] formatting +//! * `#?` - pretty-print the [`Debug`] formatting (adds linebreaks and indentation) //! * `#x` - precedes the argument with a `0x` //! * `#X` - precedes the argument with a `0x` //! * `#b` - precedes the argument with a `0b` |
