2019-09-13 11:39:14 -05:00
|
|
|
error: replacing with `mem::uninitialized()`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/repl_uninit.rs:15:23
|
2019-09-13 11:39:14 -05:00
|
|
|
|
|
|
|
|
LL | let taken_v = mem::replace(&mut v, mem::uninitialized());
|
2020-06-23 10:05:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::ptr::read(&mut v)`
|
2019-09-13 11:39:14 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::mem-replace-with-uninit` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::mem_replace_with_uninit)]`
|
2019-09-13 11:39:14 -05:00
|
|
|
|
2020-06-23 10:05:22 -05:00
|
|
|
error: replacing with `mem::MaybeUninit::uninit().assume_init()`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/repl_uninit.rs:23:23
|
2019-09-13 11:39:14 -05:00
|
|
|
|
|
2020-06-23 10:05:22 -05:00
|
|
|
LL | let taken_v = mem::replace(&mut v, mem::MaybeUninit::uninit().assume_init());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::ptr::read(&mut v)`
|
|
|
|
|
|
|
|
error: replacing with `mem::zeroed()`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/repl_uninit.rs:30:23
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
2019-09-13 11:39:14 -05:00
|
|
|
LL | let taken_v = mem::replace(&mut v, mem::zeroed());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using a default value or the `take_mut` crate instead
|
|
|
|
|
|
|
|
error: replacing with `mem::uninitialized()`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/repl_uninit.rs:43:28
|
2019-09-13 11:39:14 -05:00
|
|
|
|
|
|
|
|
LL | let taken_u = unsafe { mem::replace(uref, mem::uninitialized()) };
|
2020-06-23 10:05:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::ptr::read(uref)`
|
2019-09-13 11:39:14 -05:00
|
|
|
|
2020-06-23 10:05:22 -05:00
|
|
|
error: aborting due to 4 previous errors
|
2019-09-13 11:39:14 -05:00
|
|
|
|