]> git.lizzy.rs Git - rust.git/commitdiff
dbg_macro: notes about VCS and log::debug!(..)
authorMazdak Farrokhzad <twingoow@gmail.com>
Tue, 18 Sep 2018 05:08:26 +0000 (07:08 +0200)
committerMazdak Farrokhzad <twingoow@gmail.com>
Thu, 20 Sep 2018 15:39:09 +0000 (17:39 +0200)
src/libstd/macros.rs [changed mode: 0755->0644]
src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs [changed mode: 0755->0644]
src/test/ui/rfc-2361-dbg-macro/dbg-macro-feature-gate.rs [changed mode: 0755->0644]
src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs [changed mode: 0755->0644]
src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 8344c73..34b7713
@@ -243,8 +243,10 @@ macro_rules! eprintln {
 /// to give up ownership, you can instead borrow with `dbg!(&expr)`
 /// for some expression `expr`.
 ///
-///  and should be avoided
-/// for longer periods in version control
+/// 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.
 ///
 /// # Stability
 ///
@@ -261,7 +263,7 @@ macro_rules! eprintln {
 ///
 /// ```rust
 /// #![feature(dbg_macro)]
-/// 
+///
 /// fn foo(n: usize) {
 ///     if let Some(_) = dbg!(n.checked_sub(4)) {
 ///         // ...