about summary refs log tree commit diff
path: root/library/core/src/fmt/builders.rs
AgeCommit message (Collapse)AuthorLines
2025-02-03Mark `std::fmt::from_fn` as `#[must_use]`Yotam Ofek-0/+1
2024-10-15replace placeholder versionJosh Stone-4/+4
(cherry picked from commit 567fd9610cbfd220844443487059335d7e1ff021)
2024-10-01Stabilize `debug_more_non_exhaustive`Trevor Gross-12/+4
Fixes: https://github.com/rust-lang/rust/issues/127942
2024-08-21Rollup merge of #127945 - tgross35:debug-more-non-exhaustive, r=NoratriebMatthias Krüger-12/+212
Implement `debug_more_non_exhaustive` This implements the ACP at https://github.com/rust-lang/libs-team/issues/248, adding `.finish_non_exhaustive()` for `DebugTuple`, `DebugSet`, `DebugList`, and `DebugMap`. Also used this as an opportunity to make some documentation and tests more readable by using raw strings instead of escaped quotes. Tracking issue: https://github.com/rust-lang/rust/issues/127942
2024-08-12std::fmt::FormatterFn -> std::fmt::FromFnschvv31n-5/+14
2024-07-26Always set `result` during `finish()` in debug buildersTrevor Gross-4/+8
Most functions for format builders set `self.result` after writing strings. This ensures that any further writing fails immediately rather than trying to write again. A few `.finish()` methods did have this same behavior, so make it consistent here.
2024-07-21Implement `debug_more_non_exhaustive`Trevor Gross-0/+200
Add a `.finish_non_exhaustive()` method to `DebugTuple`, `DebugSet`, `DebugList`, and `DebugMap`. This indicates that the structures have remaining items with `..`. This implements the ACP at <https://github.com/rust-lang/libs-team/issues/248>.
2024-07-21Make use of raw strings in `core::fmt::builders`Trevor Gross-12/+12
There are quite a few uses of escaped quotes. Turn these into raw strings within documentation and tests to make things easier to read.
2024-07-19Avoid ref when using format! for perfYuri Astrakhan-1/+1
Clean up a few minor refs in `format!` macro, as it has a tiny perf cost. A few more minor related cleanups.
2023-11-10Closure-consuming helper functions for `fmt::Debug` helpersJohn Millikin-13/+131
2023-10-05Add more diagnostic items for clippyJason Newcomb-0/+1
2023-09-12Improve `PadAdapter::write_char`Benoît du Garreau-0/+8
2023-07-26docs: fmt::Debug*: Fix comments for finish method.Bruce Mitchener-3/+3
In the code sample for the `finish` method on `DebugList`, `DebugMap`, and `DebugSet`, refer to finishing the list, map, or set, rather than struct as it did.
2023-05-07enable `rust_2018_idioms` for doctestsozkanonur-5/+5
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-26Spelling library/Josh Soref-2/+2
* advance * aligned * borrowed * calculate * debugable * debuggable * declarations * desugaring * documentation * enclave * ignorable * initialized * iterator * kaboom * monomorphization * nonexistent * optimizer * panicking * process * reentrant * rustonomicon * the * uninitialized Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-08-24Remove a packing branch from `fmt::builders::PadAdapter`Benoît du Garreau-14/+4
2022-02-25Remove needless borrows from core::fmtNixon Enraght-Moony-6/+6
2021-07-11Optimize fmt::PadAdapter::wrapphlopsi-4/+1
2021-04-21Format `Struct { .. }` on one line even with `{:#?}`.Mara Bos-18/+9
2021-03-24Bump debug_non_exhaustive stabilization to 1.53.Mara Bos-1/+1
2021-03-12Update library/core/src/fmt/builders.rsGus Wynn-1/+1
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2021-03-11stabilize debug_non_exhaustiveGus Wynn-2/+1
2020-11-07Convert a bunch of intra-doc linksCamelid-26/+18
2020-07-27mv std libs to library/mark-0/+960