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`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mem_replace_macro.rs:10:21
|
2019-12-24 09:59:35 -06:00
|
|
|
|
|
2024-02-11 18:11:13 -06:00
|
|
|
LL | let _ = 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
|
|
|
|
2023-11-21 11:08:42 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-12-24 09:59:35 -06:00
|
|
|
|