]> git.lizzy.rs Git - rust.git/blob - tests/ui/mem_replace_macro.stderr
iterate List by value
[rust.git] / tests / ui / mem_replace_macro.stderr
1 error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
2   --> $DIR/mem_replace_macro.rs:9:9
3    |
4 LL |         std::mem::replace($s, Default::default())
5    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 ...
7 LL |     take!(s);
8    |     --------- in this macro invocation
9    |
10    = note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
11    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
12
13 error: aborting due to previous error
14