2019-12-24 09:59:35 -06:00
|
|
|
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
|
2019-12-24 10:26:58 -06:00
|
|
|
--> $DIR/mem_replace_macro.rs:9:9
|
2019-12-24 09:59:35 -06:00
|
|
|
|
|
|
|
|
LL | std::mem::replace($s, Default::default())
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | take!(s);
|
2021-10-14 13:28:30 -05:00
|
|
|
| -------- in this macro invocation
|
2019-12-24 09:59:35 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `take` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-12-24 09:59:35 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|