Skip to content

1.38 release post #405

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

Merged
merged 1 commit into from
Sep 26, 2019
Merged

1.38 release post #405

merged 1 commit into from
Sep 26, 2019

Conversation

Mark-Simulacrum
Copy link
Member

cc @rust-lang/release @rust-lang/core

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)


### Linting some incorrect uses of `mem::{uninitialized, zeroed}`

As [previously announced](https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt%3E-instead-of-mem::uninitialized), `std::mem::uninitialized` is hard to use soundly. Instead, `MaybeUninit<T>` should be used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1.36 announcement says that it is "essentially impossible" to use soundly. But it's not unsound to use to initialize plain-old-data (in the C++ sense), is it? If that's correct, then "hard to use soundly" seems reasonable; if not, then maybe we should go back to using stronger language.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine with "essentially impossible" as well -- I tweaked this because it sounded 100% certain but there are cases where it is OK... for example: mem::uninitialized::<MaybeUninit<u8>>(). ;)

Actually, let's change back to "essentially impossible".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As [previously announced](https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt%3E-instead-of-mem::uninitialized), `std::mem::uninitialized` is hard to use soundly. Instead, `MaybeUninit<T>` should be used.
As [previously announced](https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt%3E-instead-of-mem::uninitialized), `std::mem::uninitialized` is essentially impossible to use safely. Instead, `MaybeUninit<T>` should be used.

Copy link
Member

@BatmanAoD BatmanAoD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending the "essentially impossible" verbiage change

Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(+ verbiage change)

@Mark-Simulacrum
Copy link
Member Author

This should be ready for the release, and will be merged in ~2 hours.

@Mark-Simulacrum Mark-Simulacrum merged commit f3deeb6 into rust-lang:master Sep 26, 2019
@Mark-Simulacrum Mark-Simulacrum deleted the 1.38 branch September 26, 2019 14:10
@Mark-Simulacrum Mark-Simulacrum restored the 1.38 branch September 26, 2019 14:10
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.

7 participants