summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/mem_replace_macro.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/mem_replace_macro.stderr')
-rw-r--r--src/tools/clippy/tests/ui/mem_replace_macro.stderr14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/mem_replace_macro.stderr b/src/tools/clippy/tests/ui/mem_replace_macro.stderr
new file mode 100644
index 000000000..dd69ab8b5
--- /dev/null
+++ b/src/tools/clippy/tests/ui/mem_replace_macro.stderr
@@ -0,0 +1,14 @@
+error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
+ --> $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`
+ = note: this error originates in the macro `take` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to previous error
+