mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
c2c73189c8
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
12 lines
602 B
Text
12 lines
602 B
Text
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
|
|
--> $DIR/mem_replace_macro.rs:10:13
|
|
|
|
|
LL | inline!(std::mem::replace($s, Default::default()));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_default)]`
|
|
= note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 1 previous error
|
|
|