RS.CLIPPY.DBG_MACRO
`dbg!` macro is intended as a debugging tool
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: dbg_macro. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for usage of the dbg! macro.
Why restrict this?
The dbg! macro is intended as a debugging tool. It should not be present in released
software or committed to a version control system.
Example
dbg!(true)
Use instead:
true
Configuration
-
allow-dbg-in-tests: Whetherdbg!should be allowed in test functions or#[cfg(test)](default:
false)