From b59322e484826c11e1dcba7bf96fdbfed28d6b5b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 2 Jul 2023 20:09:01 -0700 Subject: [PATCH] Suppress diverging_sub_expression clippy lint in generated code error: sub-expression diverges --> tests/test.rs:233:13 | 233 | unimplemented!() | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression = note: `-D clippy::diverging-sub-expression` implied by `-D clippy::all` = note: this error originates in the macro `unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error: sub-expression diverges --> tests/test.rs:1257:13 | 1257 | unimplemented!() | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression = note: this error originates in the macro `unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error: sub-expression diverges --> tests/test.rs:1277:13 | 1277 | return &Thing; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression --- src/expand.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/expand.rs b/src/expand.rs index 20ee80c..9b45ec4 100644 --- a/src/expand.rs +++ b/src/expand.rs @@ -126,6 +126,7 @@ fn lint_suppress_with_body() -> Attribute { parse_quote! { #[allow( clippy::async_yields_async, + clippy::diverging_sub_expression, clippy::let_unit_value, clippy::no_effect_underscore_binding, clippy::shadow_same,