about summary refs log tree commit diff
path: root/library/std/src/macros.rs
AgeCommit message (Collapse)AuthorLines
2023-12-12added column number to dbg!()darklyspaced-3/+3
2023-08-28print macros: add xrefs to format syntax documentationIan Jackson-0/+12
2023-06-21Fix typo in `eprintln` docsclubby789-2/+2
2022-12-31Add tidy check for dbggimbles-0/+1
2022-09-07stdio: Document no support for writing to non-blocking stdio/stderrUsama Arif-0/+12
Printing to stdio/stderr that have been opened with non-blocking (O_NONBLOCK in linux) can result in an error, which is not handled by std::io module causing a panic. Signed-off-by: Usama Arif <usama.arif@bytedance.com>
2022-08-26Rollup merge of #99742 - sigaloid:master, r=thomccGuillaume Gomez-0/+22
Add comments about stdout locking This is the source of some confusion regarding the `println!` macro: * https://llogiq.github.io/2017/06/01/perf-pitfalls.html#unbuffered-io * https://news.ycombinator.com/item?id=18794930 * https://reddit.com/r/rust/comments/5puyx2/why_is_println_so_slow/dcua5g5/ * https://reddit.com/r/rust/comments/ab7hsi/comparing_pythagorean_triples_in_c_d_and_rust/ecy7ql8/ In some of these cases it's not the locking behavior where the bottleneck lies, but it's still mentioned as a surprise when, eg, benchmarking a million `println!`'s in a very tight loop. If there's any stylistic problems please feel free to correct me! This is my first contribution and I want to get it right :crab:
2022-08-21Extra documentation for new formatting featureIsaac Cloos-0/+2
High traffic macros should detail this helpful addition.
2022-07-25Add comments about stdout lockingsigaloid-0/+22
2022-05-22Make write/print macros eagerly drop temporariesDavid Tolnay-6/+6
2022-05-18Update macros.rsGim-1/+1
2022-05-01Auto merge of #96521 - petrochenkov:docrules, r=notriddle,GuillaumeGomezbors-0/+4
rustdoc: Resolve doc links referring to `macro_rules` items cc https://github.com/rust-lang/rust/issues/81633 UPD: the fallback to considering *all* `macro_rules` in the crate for unresolved names is not removed in this PR, it will be removed separately and will be run through crater.
2022-05-01Fix some links in the standard libraryVadim Petrochenkov-0/+4
2022-04-27Make [e]println macros eagerly drop temporaries (for backport)David Tolnay-6/+6
2022-03-11Format core and std macro rules, removing needless surrounding blocksDavid Tolnay-10/+18
2022-01-06Add diagnostic items for macrosAlex Macleod-0/+5
2021-08-01bump bootstrap compiler to 1.55Pietro Albini-2/+1
2021-07-27Make `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` warn by defaultAaron Hill-1/+1
2021-07-13expand: Support helper attributes for built-in derive macrosVadim Petrochenkov-1/+2
2021-05-13Change "etc." to "and similar"Ian Jackson-1/+1
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-05-12dbg macro: Discuss use in tests, and slightly clarifyIan Jackson-3/+4
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-02-23Use #[doc = include_str!()] in stdLeSeulArtichaut-1/+1
2021-02-20Update the bootstrap compilerJoshua Nelson-15/+0
Note this does not change `core::derive` since it was merged after the beta bump.
2021-01-25Implement new panic!() behaviour for Rust 2021.Mara Bos-0/+16
2021-01-21Document why cannot use concat! in dbg!Lzu Tao-0/+4
Co-authored-by: Miguel Ojeda <ojeda@users.noreply.github.com>
2020-12-30Bump bootstrap compiler to 1.50 betaMark Rousskov-1/+1
2020-10-19Add cfg(not(test)) to std_panic_macro rustc_diagnostic_item.Mara Bos-1/+1
2020-10-18Add cfg(not(bootstrap)) on the new rustc_diagnostic_item attributes.Mara Bos-1/+1
The beta compiler doesn't accept rustc_diagnostic_items on macros yet.
2020-10-18Mark the panic macros as diagnostic items.Mara Bos-0/+1
2020-10-26Use ? in core/std macrosTaiki Endo-5/+2
2020-08-22Add missing linksCamelid-3/+3
2020-08-22Add missing intra-doc linkCamelid-0/+2
2020-08-22Switch to intra-doc links in `std::macros`Camelid-11/+8
Also: * Fix typo in module docs * Link to `std::io::stderr` instead of `std::io::Stderr` to match the link text * Link to `std::io::stdout`
2020-07-27mv std libs to library/mark-0/+313