Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mem::uninitialized -> MaybeUninit #24

Merged
merged 2 commits into from Aug 21, 2019
Merged

mem::uninitialized -> MaybeUninit #24

merged 2 commits into from Aug 21, 2019

Conversation

alecmocatta
Copy link
Member

Now that MaybeUninit is stable and usage has been somewhat clarified, switch to it. The uninitialized byte buffer impl is copied from io::copy() and thus currently inherits:

// FIXME(#53491): This is calling `get_mut` and `get_ref` on an uninitialized
// `MaybeUninit`. Revisit this once we decided whether that is valid or not.
// This is still technically undefined behavior due to creating a reference
// to uninitialized data, but within libstd we can rely on more guarantees
// than if this code were in an external lib.

@mergify mergify bot merged commit ac807ec into master Aug 21, 2019
@mergify mergify bot deleted the uninit branch August 21, 2019 17:34
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.

None yet

1 participant