about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorChristian <chris_veenman@hotmail.com>2019-03-29 15:56:22 +0100
committerChristian <chris_veenman@hotmail.com>2019-03-29 15:56:22 +0100
commitf10e44420a072881cce6d7819d2b2bfb99df90df (patch)
tree79fe542ac5d0a484b1e7627926da323fbd8a17c1 /src/libstd
parentcd45b19bd2d8b4f9a3940a409ea43285019f3280 (diff)
downloadrust-f10e44420a072881cce6d7819d2b2bfb99df90df.tar.gz
rust-f10e44420a072881cce6d7819d2b2bfb99df90df.zip
Edited the dbg! docs stating that dbg! works the same way in release builds.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 9d0eb2e6b1c..ee5a8e6631e 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -231,10 +231,13 @@ macro_rules! eprintln {
 /// to give up ownership, you can instead borrow with `dbg!(&expr)`
 /// for some expression `expr`.
 ///
+/// The `dbg!` macro works exactly the same in release builds. This is useful when debugging issues
+/// that only occur in release 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 longer periods.
 /// Use cases involving debug output that should be added to version control
-/// may be better served by macros such as `debug!` from the `log` crate.
+/// are better served by macros such as [`debug!`][debug-log] from the [`log`][log] crate.
 ///
 /// # Stability
 ///
@@ -306,6 +309,8 @@ macro_rules! eprintln {
 /// ```
 ///
 /// [stderr]: https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)
+/// [debug-log]: https://docs.rs/log/*/log/macro.debug.html
+/// [log]: https://docs.rs/log/
 #[macro_export]
 #[stable(feature = "dbg_macro", since = "1.32.0")]
 macro_rules! dbg {