rust/tests/ui/mem_replace_macro.stderr

14 lines
437 B
Plaintext
Raw Normal View History

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
|
LL | std::mem::replace($s, Default::default())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | take!(s);
| --------- in this macro invocation
|
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
error: aborting due to previous error