about summary refs log tree commit diff
path: root/src/libcore/fmt/builders.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-960/+0
2020-01-28stabilize the debug_map_key_value featureAshley Mannix-4/+2
2020-01-24Use Self instead of self return typeLzu Tao-10/+10
2020-01-14Implement `finish_non_exhaustive` for `DebugStruct`.Richard Dodd-0/+56
2019-12-22Format the worldMark Rousskov-65/+34
2019-10-10move debug_map assertions after check for errAshley Mannix-7/+9
2019-08-17Make fmt-internal functions privateMatthew Jasper-5/+8
2019-07-09add feature to docsAshley Mannix-0/+2
2019-07-08add key and value methods to DebugMapAshley Mannix-17/+141
2019-04-19libcore: deny more...Mazdak Farrokhzad-1/+1
2019-04-18libcore => 2018Taiki Endo-1/+1
2019-04-05Include trailing comma in multiline Debug representationDavid Tolnay-58/+32
This commit changes the behavior of Formatter::debug_struct, debug_tuple, debug_list, debug_set, and debug_map to render trailing commas in {:#?} mode, which is the dominant style in modern Rust code. Before: Language { name: "Rust", trailing_commas: false } After: Language { name: "Rust", trailing_commas: true, }
2019-02-19Add missing fmt structs examplesGuillaume Gomez-10/+313
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-29Use impl_header_lifetime_elision in libcoreScott McMurray-1/+1
2018-07-25Enforce #![deny(bare_trait_objects)] in src/libcoreljedrz-7/+7
2018-05-07Add explanation for #[must_use] on Debug buildersManish Goregaokar-5/+5
2017-11-27Keep access to private Formatter fields in Formatter methodsSimon Sapin-43/+28
2017-11-24Make fmt::DebugList and friends forward formatting parametersSimon Sapin-28/+58
For example, formatting slice of integers with `{:04?}` should zero-pad each integer.
2017-10-07fmt: DRYTamir Duberstein-5/+5
2017-08-24Fix inconsistent doc headingslukaramu-5/+5
This fixes headings reading "Unsafety" and "Example", they should be "Safety" and "Examples" according to RFC 1574.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-11/+11
Like #43008 (f668999), but _much more aggressive_.
2017-07-02Add docs for Debug* structs. #29355Ryan Thomas-10/+129
This adds docs for the Debug* structs as well as examples from the Formatter::debug_* methods, so that a user knows how to construct them. I added these examples as the builders module is not public and hence the debug_*_new() functions are not available to a user. r? @steveklabnik Review comments. Mainly adding in the links for all of the structs and functions. Remove rust tag on code blocks.
2016-08-24Use `#[prelude_import]` in `libcore`.Jeffrey Seyfried-1/+0
2016-04-12Remove unused trait importsSeo Sanghyeon-1/+1
2016-03-22try! -> ?Jorge Aparicio-4/+4
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-20libcore: add Debug implementations to most missing typesSean McArthur-0/+5
2016-03-12std: Clean out deprecated APIsAlex Crichton-16/+12
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-01-16std: Stabilize APIs for the 1.7 releaseAlex Crichton-0/+1
This commit stabilizes and deprecates the FCP (final comment period) APIs for the upcoming 1.7 beta release. The specific APIs which changed were: Stabilized * `Path::strip_prefix` (renamed from `relative_from`) * `path::StripPrefixError` (new error type returned from `strip_prefix`) * `Ipv4Addr::is_loopback` * `Ipv4Addr::is_private` * `Ipv4Addr::is_link_local` * `Ipv4Addr::is_multicast` * `Ipv4Addr::is_broadcast` * `Ipv4Addr::is_documentation` * `Ipv6Addr::is_unspecified` * `Ipv6Addr::is_loopback` * `Ipv6Addr::is_unique_local` * `Ipv6Addr::is_multicast` * `Vec::as_slice` * `Vec::as_mut_slice` * `String::as_str` * `String::as_mut_str` * `<[T]>::clone_from_slice` - the `usize` return value is removed * `<[T]>::sort_by_key` * `i32::checked_rem` (and other signed types) * `i32::checked_neg` (and other signed types) * `i32::checked_shl` (and other signed types) * `i32::checked_shr` (and other signed types) * `i32::saturating_mul` (and other signed types) * `i32::overflowing_add` (and other signed types) * `i32::overflowing_sub` (and other signed types) * `i32::overflowing_mul` (and other signed types) * `i32::overflowing_div` (and other signed types) * `i32::overflowing_rem` (and other signed types) * `i32::overflowing_neg` (and other signed types) * `i32::overflowing_shl` (and other signed types) * `i32::overflowing_shr` (and other signed types) * `u32::checked_rem` (and other unsigned types) * `u32::checked_neg` (and other unsigned types) * `u32::checked_shl` (and other unsigned types) * `u32::saturating_mul` (and other unsigned types) * `u32::overflowing_add` (and other unsigned types) * `u32::overflowing_sub` (and other unsigned types) * `u32::overflowing_mul` (and other unsigned types) * `u32::overflowing_div` (and other unsigned types) * `u32::overflowing_rem` (and other unsigned types) * `u32::overflowing_neg` (and other unsigned types) * `u32::overflowing_shl` (and other unsigned types) * `u32::overflowing_shr` (and other unsigned types) * `ffi::IntoStringError` * `CString::into_string` * `CString::into_bytes` * `CString::into_bytes_with_nul` * `From<CString> for Vec<u8>` * `From<CString> for Vec<u8>` * `IntoStringError::into_cstring` * `IntoStringError::utf8_error` * `Error for IntoStringError` Deprecated * `Path::relative_from` - renamed to `strip_prefix` * `Path::prefix` - use `components().next()` instead * `os::unix::fs` constants - moved to the `libc` crate * `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize * `IntoCow` - conflicts with `Into` and may come back later * `i32::{BITS, BYTES}` (and other integers) - not pulling their weight * `DebugTuple::formatter` - will be removed * `sync::Semaphore` - not used enough and confused with system semaphores Closes #23284 cc #27709 (still lots more methods though) Closes #27712 Closes #27722 Closes #27728 Closes #27735 Closes #27729 Closes #27755 Closes #27782 Closes #27798
2015-10-08rustfmt part of libcore/fmtMichael Pankov-14/+48
Rest is blocked by https://github.com/nrc/rustfmt/issues/413
2015-08-15core: Fill out issues for unstable featuresAlex Crichton-1/+2
2015-08-03syntax: Implement #![no_core]Alex Crichton-1/+1
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-10Add trailing , for 1-tuplesSteven Fackler-0/+6
2015-05-19Stabilize debug builders for 1.2.0Steven Fackler-13/+18
2015-05-17Fix finish docsSteven Fackler-10/+5
2015-05-17Make debug builders take &mut self, add entries methodSteven Fackler-11/+41
[breaking-change]
2015-03-28Update debug helpers and add list builderSteven Fackler-53/+85
The collections debug helpers no longer prefix output with the collection name, in line with the current conventions for Debug implementations. Implementations that want to preserve the current behavior can simply add a `try!(write!(fmt, "TypeName "));` at the beginning of the `fmt` method. [breaking-change]
2015-03-11Switch to a specific featureSteven Fackler-10/+10
2015-03-10Remove inline silliness from debug buildersSteven Fackler-60/+11
Turns out it's basically a wash, codegen wise.
2015-03-09Switch derive(Debug) to use the debug buildersSteven Fackler-0/+18
2015-03-09Restructure debug builders to minimize codegenSteven Fackler-18/+58
Switching from generic bounds to trait objects and having un-inlined inner methods should cut down on the size of Debug impls, since we care about the speed of a Debug implementation way less than binary bloat.
2015-03-09Implement RFC 640Steven Fackler-0/+292