Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Mar 27, 2013

No description provided.

@ghost
Copy link
Author

ghost commented Mar 28, 2013

Rebased against incoming, should be ready for another try.

@bors bors closed this Mar 28, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 23, 2020
…ansch,oli-obk

New lint: suggest `ptr::read` instead of `mem::replace(..., uninitialized())`

resolves: rust-lang#5575

changelog: improvements to `MEM_REPLACE_WITH_UNINIT`:
- add a new test case in `tests/ui/repl_uninit.rs` to cover the case of replacing with `mem::MaybeUninit::uninit().assume_init()`.
- modify the existing `MEM_REPLACE_WITH_UNINIT` when replacing with `mem::uninitialized` to suggest using `ptr::read` instead.
- lint with `MEM_REPLACE_WITH_UNINIT` when replacing with `mem::MaybeUninit::uninit().assume_init()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants