Skip to content

Commit c261015

Browse files
committed
Ignore incorrect suggestion from manual_map lint
rust-lang/rust-clippy#6797 error[E0382]: use of partially moved value: `self` --> serde_derive/src/internals/attr.rs:71:24 | 71 | self.value.map(|value| (self.tokens, value)) | ----^^^^^^^---------------------- | | | | | | | use occurs due to use in closure | | value used here after partial move | `self.value` partially moved due to this method call | note: this function takes ownership of the receiver `self`, which moves `self.value` --> /home/david/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:485:38 | 485 | pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> { | ^^^^ = note: partial move occurs because `self.value` has type `std::option::Option<T>`, which does not implement the `Copy` trait
1 parent 6b5e5a8 commit c261015

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

serde_derive/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#![allow(
2121
clippy::cognitive_complexity,
2222
clippy::enum_variant_names,
23+
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6797
24+
clippy::manual_map,
2325
clippy::match_like_matches_macro,
2426
clippy::needless_pass_by_value,
2527
clippy::too_many_arguments,

serde_derive_internals/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Ignored clippy lints
55
#![allow(
66
clippy::cognitive_complexity,
7+
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6797
8+
clippy::manual_map,
79
clippy::missing_panics_doc,
810
clippy::redundant_field_names,
911
clippy::result_unit_err,

0 commit comments

Comments
 (0)