Skip to content

Commit

Permalink
Rollup merge of rust-lang#85221 - ijackson:dbg-doc-re-tests, r=joshtr…
Browse files Browse the repository at this point in the history
…iplett

dbg macro: Discuss use in tests, and slightly clarify

As discussed in a tangent in rust-lang#82778.

I chose to use [semantic newlines](https://rhodesmill.org/brandon/2012/one-sentence-per-line/) in the source text but I don't mind reformatting it.
  • Loading branch information
GuillaumeGomez committed May 15, 2021
2 parents cda7f62 + b36a316 commit 7e70b05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/std/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ macro_rules! eprintln {
/// builds or when debugging in release mode is significantly faster.
///
/// Note that the macro is intended as a debugging tool and therefore you
/// should avoid having uses of it in version control for long periods.
/// Use cases involving debug output that should be added to version control
/// are better served by macros such as [`debug!`] from the [`log`] crate.
/// should avoid having uses of it in version control for long periods
/// (other than in tests and similar).
/// Debug output from production code is better done with other facilities
/// such as the [`debug!`] macro from the [`log`] crate.
///
/// # Stability
///
Expand Down

0 comments on commit 7e70b05

Please sign in to comment.