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`
|
2023-03-24 08:04:35 -05:00
|
|
|
--> $DIR/mem_replace_macro.rs:10:13
|
2019-12-24 09:59:35 -06:00
|
|
|
|
|
2023-03-24 08:04:35 -05:00
|
|
|
LL | inline!(std::mem::replace($s, Default::default()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-12-24 09:59:35 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_default)]`
|
2023-03-24 08:04:35 -05: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 09:59:35 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|