Ignore uninlined_format_args pedantic clippy lint false positive

Clippy's suggested fix is not valid in 2018 edition. The
serde_test_suite crate can't be updated to 2021 edition yet because CI
of the serde crate on old toolchains needs to be able to parse all
manifests in the workspace, even if serde_test_suite is not being
compiled in those builds.

    error: variables can be used directly in the `format!` string
        --> test_suite/tests/test_de.rs:2260:23
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {}", e),
         |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
         = note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
    help: change this to
         |
    2260 -             Err(e) => panic!("tokens failed to deserialize: {}", e),
    2260 +             Err(e) => panic!("tokens failed to deserialize: {e}"),
         |

    warning: unused variable: `e`
        --> test_suite/tests/test_de.rs:2260:17
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {e}"),
         |                 ^ help: if this is intentional, prefix it with an underscore: `_e`
         |
         = note: `#[warn(unused_variables)]` on by default

    warning: panic message contains an unused formatting placeholder
        --> test_suite/tests/test_de.rs:2260:61
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {e}"),
         |                                                             ^^^
         |
         = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
         = note: `#[warn(non_fmt_panics)]` on by default
    help: add the missing argument
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {e}", ...),
         |                                                                 +++++
    help: or add a "{}" format string to use the message literally
         |
    2260 |             Err(e) => panic!("{}", "tokens failed to deserialize: {e}"),
         |                              +++++
This commit is contained in:
David Tolnay 2022-10-07 21:46:14 -07:00
parent d96e181150
commit f803b290f3
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -5,6 +5,7 @@
clippy::empty_enum,
clippy::manual_assert,
clippy::needless_pass_by_value,
clippy::uninlined_format_args,
clippy::unreadable_literal
)]
#![cfg_attr(feature = "unstable", feature(never_type))]