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}"),
| +++++
error: variables can be used directly in the `format!` string
--> test_suite/tests/test_annotations.rs:1238:30
|
1238 | serializer.serialize_str(format!("{};{:?}", f1, f2).as_str())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
1238 - serializer.serialize_str(format!("{};{:?}", f1, f2).as_str())
1238 + serializer.serialize_str(format!("{f1};{f2:?}").as_str())
|
For whatever reason, the #![cfg_attr(feature = "cargo-clippy", allow(let_underscore_drop))]
attributes already in the code stopped working in the most recent nightly (2022-09-03).
Likely in connection with https://github.com/rust-lang/rust/pull/97739 ?
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:958:13
|
958 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= note: `-D clippy::let-underscore-drop` implied by `-D clippy::pedantic`
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:992:13
|
992 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1616:9
|
1616 | let _ = deserializer;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1640:9
|
1640 | let _ = deserializer;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1651:9
|
1651 | let _ = seq;
| ^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1662:9
|
1662 | let _ = map;
| ^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1673:9
|
1673 | let _ = data;
| ^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/private/de.rs:1440:13
|
1440 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/private/de.rs:2163:13
|
2163 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
Bincode has been in prerelease limbo for nearly a year and the readme
does not mention anything related to Serde, so it is not serving as a
good first link to a Serde binary format.
error: deref which would be done by auto-deref
--> serde/src/de/impls.rs:2014:59
|
2014 | ... Err(Error::unknown_field(&*value, FIELDS))
| ^^^^^^ help: try this: `value`
|
= note: `-D clippy::explicit-auto-deref` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
error: deref which would be done by auto-deref
--> serde/src/de/impls.rs:2354:55
|
2354 | ... Err(Error::unknown_field(&*value, FIELDS))
| ^^^^^^ help: try this: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref