Exposes false negative in clippy's diverging_sub_expression

This commit is contained in:
David Tolnay 2023-05-14 07:58:06 -07:00
parent 35e5aac5c8
commit fcb132765c

View file

@ -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