blob: 7fb72cdf5a480542340a4469423edbb3b0b7ce5e [file] [edit]
error: replacing a value of type `T` with `T::default()`
--> tests/ui/mem_replace_with_default_no_std.rs:12:13
|
LL | let _ = mem::replace(&mut refstr, "");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `core::mem::take` instead: `core::mem::take(&mut refstr)`
|
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_default)]`
error: replacing a value of type `T` with `T::default()`
--> tests/ui/mem_replace_with_default_no_std.rs:16:13
|
LL | let _ = mem::replace(&mut slice, &[]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `core::mem::take` instead: `core::mem::take(&mut slice)`
error: replacing a value of type `T` with `T::default()`
--> tests/ui/mem_replace_with_default_no_std.rs:22:21
|
LL | let _ = inline!(mem::replace(&mut $refstr, ""));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `core::mem::take` instead: `core::mem::take(&mut $refstr)`
|
= note: this error originates in the macro `__inline_mac_fn_macros` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 3 previous errors