From 4be97e0b24246891eefe5eef90509b5c0450b313 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 14 May 2023 07:58:06 -0700 Subject: [PATCH] Exposes false negative in clippy's diverging_sub_expression --- .../clippy/tests/ui/diverging_sub_expression.stderr | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/tools/clippy/tests/ui/diverging_sub_expression.stderr b/src/tools/clippy/tests/ui/diverging_sub_expression.stderr index 9c91d935716..51a3b0d972e 100644 --- a/src/tools/clippy/tests/ui/diverging_sub_expression.stderr +++ b/src/tools/clippy/tests/ui/diverging_sub_expression.stderr @@ -30,19 +30,11 @@ error: sub-expression diverges LL | 3 => true || diverge(), | ^^^^^^^^^ -error: sub-expression diverges - --> $DIR/diverging_sub_expression.rs:36:30 - | -LL | _ => true || panic!("boo"), - | ^^^^^^^^^^^^^ - | - = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) - error: sub-expression diverges --> $DIR/diverging_sub_expression.rs:38:26 | LL | _ => true || break, | ^^^^^ -error: aborting due to 7 previous errors +error: aborting due to 6 previous errors