File tree 1 file changed +4
-8
lines changed
compiler/rustc_lint_defs/src
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -221,14 +221,10 @@ declare_lint! {
221
221
///
222
222
/// ### Explanation
223
223
///
224
- /// This lint detects code that is very likely incorrect. When possible,
225
- /// the compiler will attempt to detect situations where code can be
226
- /// evaluated at compile-time to generate more efficient code. While
227
- /// evaluating such code, if it detects that the code will unconditionally
228
- /// panic, this usually indicates that it is doing something incorrectly.
229
- /// If this lint is allowed, then the code will not be evaluated at
230
- /// compile-time, and instead continue to generate code to evaluate at
231
- /// runtime, which may panic during runtime.
224
+ /// This lint detects code that is very likely incorrect because it will
225
+ /// always panic, such as division by zero and out-of-bounds array
226
+ /// accesses. Consider adjusting your code if this is a bug, or using the
227
+ /// `panic!` or `unreachable!` macro instead in case the panic is intended.
232
228
pub UNCONDITIONAL_PANIC ,
233
229
Deny ,
234
230
"operation will cause a panic at runtime"
You can’t perform that action at this time.
0 commit comments