Skip to content

Commit f99c223

Browse files
committed
rust: std_vendor: make dbg! usage as temporary code more concrete
This is part of the effort to minimize the differences of the `rust` branch with respect to mainline in order to eventually drop it. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent ad2a103 commit f99c223

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rust/kernel/std_vendor.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@
3535
/// This is useful when debugging issues that only occur in release
3636
/// builds or when debugging in release mode is significantly faster.
3737
///
38-
/// Note that the macro is intended as a debugging tool and therefore you
39-
/// should avoid having uses of it in version control for long periods
40-
/// (other than in tests and similar).
38+
/// Note that the macro is intended as a temporary debugging tool to be
39+
/// used during development. Therefore, avoid committing `dbg!` macro
40+
/// invocations into the kernel tree.
41+
///
42+
/// For debug output that is intended to be kept in the kernel tree,
43+
/// use [`pr_debug`] and similar facilities instead.
4144
///
4245
/// # Stability
4346
///
@@ -134,6 +137,7 @@
134137
///
135138
/// [`std::dbg`]: https://doc.rust-lang.org/std/macro.dbg.html
136139
/// [`pr_info`]: crate::pr_info
140+
/// [`pr_debug`]: crate::pr_debug
137141
/// [`eprintln`]: https://doc.rust-lang.org/std/macro.eprintln.html
138142
/// [`printk`]: https://www.kernel.org/doc/html/latest/core-api/printk-basics.html
139143
#[macro_export]

0 commit comments

Comments
 (0)