RS.CLIPPY.PANIC
Usage of the `panic!` macro
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: panic. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for usage of panic!.
Why restrict this?
This macro, or panics in general, may be unwanted in production code.
Example
panic!("even with a good reason");
Configuration
-
allow-panic-in-tests: Whetherpanicshould be allowed in test functions or#[cfg(test)](default:
false)