2019-12-24 15:59:35 +00:00
|
|
|
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/mem_replace_macro.rs:10:21
|
2019-12-24 15:59:35 +00:00
|
|
|
|
|
2024-02-12 00:11:13 +00:00
|
|
|
LL | let _ = inline!(std::mem::replace($s, Default::default()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-12-24 15:59:35 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_default)]`
|
2023-03-24 13:04:35 +00:00
|
|
|
= note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-12-24 15:59:35 +00:00
|
|
|
|
2023-11-21 17:08:42 +00:00
|
|
|
error: aborting due to 1 previous error
|
2019-12-24 15:59:35 +00:00
|
|
|
|