]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/panic_unimplemented.rs
Rollup merge of #85760 - ChrisDenton:path-doc-platform-specific, r=m-ou-se
[rust.git] / src / tools / clippy / clippy_lints / src / panic_unimplemented.rs
index 1e9468589472326ad23098a935f3de9ff052a747..1a680e7607e0b21e0116df6e0fa4363af52081b9 100644 (file)
@@ -74,7 +74,7 @@
 
 impl<'tcx> LateLintPass<'tcx> for PanicUnimplemented {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
-        if match_panic_call(cx, expr).is_some() {
+        if match_panic_call(cx, expr).is_some() && is_expn_of(expr.span, "debug_assert").is_none() {
             let span = get_outer_span(expr);
             if is_expn_of(expr.span, "unimplemented").is_some() {
                 span_lint(