about summary refs log tree commit diff
path: root/src/libcore/fmt
AgeCommit message (Collapse)AuthorLines
2019-08-30Add a "diagnostic item" schemeOliver Scherer-1/+2
This allows lints and other diagnostics to refer to items by a unique ID instead of relying on whacky path resolution schemes that may break when items are relocated.
2019-08-17Make fmt-internal functions privateMatthew Jasper-5/+8
2019-08-17Make built-in derives opaque macrosMatthew Jasper-1/+1
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-2/+0
2019-08-10Give built-in macros stable addresses in the standard libraryVadim Petrochenkov-0/+15
2019-07-27Remove run-pass test suitesVadim Petrochenkov-1/+1
2019-07-22Rollup merge of #62799 - RalfJung:uninit-array, r=CentrilMazdak Farrokhzad-2/+2
use const array repeat expressions for uninit_array With a first implementation of https://github.com/rust-lang/rust/issues/49147 having landed, we can make this macro nicer and phase it out with the next bootstrap bump. However, to make this work, we have to mark `MaybeUninit::uninit()` as promotable. I do feel uneasy about promoting stuff involving uninitialized memory, but OTOH no *operation* on `MaybeUninit` is promotable, so maybe this is okay? r? @oli-obk @eddyb
2019-07-19avoid uninit_array! macro where it is not neededRalf Jung-2/+2
2019-07-19use const array repeat expressions for uninit_arrayRalf Jung-2/+2
2019-07-19do not use mem::uninitialized in std::ioRalf Jung-3/+4
2019-07-09add feature to docsAshley Mannix-0/+2
2019-07-08add key and value methods to DebugMapAshley Mannix-17/+141
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-4/+4
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-05-19Fix data types indicationVeryTastyTomato-2/+2
Fix the data types indication in basic examples of the Trait std::fmt::LowerExp and std::fmt::UpperExp. Since there aren’t any type annotation on the let statement using the number 42.0, they are of type f64 according to The Book: https://doc.rust-lang.org/book/ch03-02-data-types.html#floating-point-types
2019-04-19libcore: deny more...Mazdak Farrokhzad-83/+83
2019-04-18libcore => 2018Taiki Endo-19/+19
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-03-26adjust MaybeUninit API to discussionsRalf Jung-10/+10
uninitialized -> uninit into_initialized -> assume_init read_initialized -> read set -> write
2019-02-22avoid unnecessary use of MaybeUninit::get_ref, and expand comment on the othersRalf Jung-0/+4
2019-02-20Rollup merge of #58538 - GuillaumeGomez:fmt-examples, r=Centrilkennytm-10/+313
Add missing fmt structs examples r? @rust-lang/docs
2019-02-19Add missing fmt structs examplesGuillaume Gomez-10/+313
2019-02-13Rollup merge of #58272 - fitzgen:num-format-code-size, r=Mark-SimulacrumMazdak Farrokhzad-74/+114
Cut down on number formating code size r? @alexcrichton
2019-02-10libs: doc commentsAlexander Regueiro-2/+2
2019-02-08Use write_char for writing padding charactersNick Fitzgerald-22/+8
Removes some unsafe *and* saves almost half a kilobyte of code size.
2019-02-08Also de-duplicate 32- and 64-bit number formatting on wasm32Nick Fitzgerald-8/+18
2019-02-07Un-monomorphize and inline formatting with paddingNick Fitzgerald-29/+57
The generic `F` in `with_padding` was causing a bunch of stuff to get inlined that otherwise needn't be, blowing up code size.
2019-02-07De-duplicate write_prefix lambda in pad_integralNick Fitzgerald-11/+20
For smaller code size.
2019-02-07De-duplicate number formatting implementations for smaller code sizeNick Fitzgerald-31/+38
Instead of inlining the same logic into every number formatting implementation, pull it out into a function that each of the number formatting impls call into.
2019-01-28rename first_mut_ptr -> first_ptr_mutRalf Jung-1/+1
2019-01-28add macro for creating uninitialized arrayRalf Jung-12/+2
2019-01-28libcore: avoid mem::uninitialized and raw ptr castsRalf Jung-7/+21
2019-01-28libcore: remove unneeded allow(deprecated)Ralf Jung-3/+1
2019-01-22Rollup merge of #57537 - sinkuu:fmt_perf, r=alexcrichtonMazdak Farrokhzad-4/+6
Small perf improvement for fmt Added benchmark is based on #10761
2019-01-19Rollup merge of #57452 - steveklabnik:improve-formatter-docs, r=frewsxcvMazdak Farrokhzad-3/+12
Improve docs for Formatter Some improvements to `std::fmt::Formatter` to make it a bit more consistent with other documentation, as well as calling out that you don't ever instantiate one yourself.
2019-01-12Utilize specialized zip iterator implShotaro Yamada-4/+6
name old ns/iter new ns/iter diff ns/iter diff % speedup fmt::write_str_macro1 13,927 12,489 -1,438 -10.33% x 1.12 fmt::write_str_macro2 24,633 23,418 -1,215 -4.93% x 1.05 fmt::write_str_macro_debug 234,633 233,092 -1,541 -0.66% x 1.01 fmt::write_str_ref 5,819 5,823 4 0.07% x 1.00 fmt::write_str_value 6,012 5,828 -184 -3.06% x 1.03 fmt::write_vec_macro1 18,550 17,143 -1,407 -7.58% x 1.08 fmt::write_vec_macro2 30,369 28,920 -1,449 -4.77% x 1.05 fmt::write_vec_macro_debug 244,338 244,901 563 0.23% x 1.00 fmt::write_vec_ref 5,952 5,885 -67 -1.13% x 1.01 fmt::write_vec_value 5,944 5,894 -50 -0.84% x 1.01
2019-01-09Improve docs for FormatterSteve Klabnik-3/+12
2019-01-09Misc cleanupsShotaro Yamada-6/+6
2019-01-06Derive Clone for ArgumentV1Shotaro Yamada-9/+1
manual impl was a workaround for #28229.
2019-01-06Remove unnecessary adapterShotaro Yamada-23/+2
2018-12-25Remove licensesMark Rousskov-50/+0
2018-12-13Wording changesEsteban Küber-3/+3
2018-12-12Suggest using `.display()` when trying to print a `Path`Esteban Küber-2/+7
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-12-02let FIXME refer to tracking issueRalf Jung-1/+1
2018-11-27add comments explaining our uses of get_ref/get_mut for MaybeUninitRalf Jung-0/+3
2018-11-23use MaybeUninit in core::fmtRalf Jung-13/+14
Code by @japaric, I just split it into individual commits
2018-10-13doc: make core::fmt::Error example more simpleTshepang Lekhonkhobe-3/+2
2018-09-29Use impl_header_lifetime_elision in libcoreScott McMurray-14/+14
2018-09-29Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"Ralf Jung-14/+13
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
2018-09-22core: fix deprecated warningsJorge Aparicio-13/+14