Skip to content

Commit

Permalink
Suppress diverging_sub_expression clippy lint in generated code
Browse files Browse the repository at this point in the history
    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
  • Loading branch information
dtolnay committed Jul 3, 2023
1 parent fbd310e commit b59322e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b59322e

Please sign in to comment.