Adds an internal lint to check for `#[derive(serde::Deserialize)]` without [`#[serde(deny_unknown_fields)]`](https://serde.rs/container-attrs.html#deny_unknown_fields). Today, if you run Clippy with the following clippy.toml, Clippy will produce a warning, but there will be no accompanying note: ```toml # In the following configuration, "recommendation" should be "reason" or "replacement". disallowed-macros = [ { path = "std::panic", recommendation = "return a `std::result::Result::Error` instead" }, ] ``` ```sh $ cargo clippy Checking a v0.1.0 (/home/smoelius/tmp/a) warning: use of a disallowed macro `std::panic` --> src/lib.rs:2:5 | 2 | panic!(); | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros = note: `#[warn(clippy::disallowed_macros)]` on by default ``` The underlying problem is: the enum that derives `serde::Deserialize` ([`DisallowedPathEnum`]( |
||
|---|---|---|
| .. | ||
| test_utils | ||
| ui | ||
| ui-cargo | ||
| ui-internal | ||
| ui-toml | ||
| workspace_test | ||
| check-fmt.rs | ||
| clippy.toml | ||
| compile-test.rs | ||
| config-metadata.rs | ||
| dogfood.rs | ||
| headers.rs | ||
| integration.rs | ||
| lint_message_convention.rs | ||
| missing-test-files.rs | ||
| versioncheck.rs | ||
| workspace.rs | ||