-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveT-macrosType: Issues with macros and macro expansionType: Issues with macros and macro expansion
Description
Lint name:
clippy::default_trait_access
I tried this code:
error: calling `std::option::Option::default()` is more clear than this expression
--> src\domain\types\api\match_info_response.rs:233:24
|
233 | #[derive(Clone, Debug, TypedBuilder, PartialEq, Serialize, Deserialize)]
| ^^^^^^^^^^^^
|
note: the lint level is defined here
--> src/lib.rs:3:9
|
3 | #![deny(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::default_trait_access)]` implied by `#[deny(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
I expected to see this happen:
To not show up
Instead, this happened: See above
Meta
Using cargo +nightly clippy
cargo clippy -V
: clippy 0.1.52 (45b3c28 2021-03-04)rustc -Vv
:rustc 1.52.0-nightly (45b3c2851 2021-03-04) binary: rustc commit-hash: 45b3c28518e4c45dfd12bc2c4400c0d0e9639927 commit-date: 2021-03-04 host: x86_64-pc-windows-msvc release: 1.52.0-nightly LLVM version: 12.0.0
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveT-macrosType: Issues with macros and macro expansionType: Issues with macros and macro expansion