]> git.lizzy.rs Git - rust.git/commitdiff
Clean up dogfood fallout
authorJarredAllen <jarredallen73@gmail.com>
Thu, 16 Jul 2020 23:58:21 +0000 (16:58 -0700)
committerJarredAllen <jarredallen73@gmail.com>
Thu, 16 Jul 2020 23:58:21 +0000 (16:58 -0700)
clippy_lints/src/panic_unimplemented.rs

index 9944b4096baee5bd4fe6b42ac049e10ead7e071e..6379dffd22e372ac8305f8fce41fe8a50ad2e555 100644 (file)
@@ -97,7 +97,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
             if let ExprKind::Block(ref block, _) = expr.kind;
             if let Some(ref ex) = block.expr;
             if let Some(params) = match_function_call(cx, ex, &paths::BEGIN_PANIC)
-                .or(match_function_call(cx, ex, &paths::BEGIN_PANIC_FMT));
+                .or_else(|| match_function_call(cx, ex, &paths::BEGIN_PANIC_FMT));
             then {
                 let span = get_outer_span(expr);
                 if is_expn_of(expr.span, "unimplemented").is_some() {