Skip to content

Commit 6ebff40

Browse files
RalfJungMark-Simulacrum
authored andcommitted
Rust 1.36 release tweaks (#395)
1 parent d72140e commit 6ebff40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

posts/2019-07-04-Rust-1.36.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ but required a global allocator and other OS capabilities in return.
5050

5151
Starting with Rust 1.36.0, the parts of `std` that depend on a global allocator, e.g. `Vec<T>`,
5252
are now available in the `alloc` crate. The `std` crate then re-exports these parts.
53-
While `#![no_std]` binaries using `alloc` still require nightly Rust,
54-
`#![no_std]` library crates can use the `alloc` crate in stable Rust.
53+
While `#![no_std]` *binaries* using `alloc` still require nightly Rust,
54+
`#![no_std]` *library* crates can use the `alloc` crate in stable Rust.
5555
Meanwhile, normal binaries, without `#![no_std]`, can depend on such library crates.
5656
We hope this will facilitate the development of a `#![no_std]` compatible ecosystem of libraries
5757
prior to stabilizing support for `#![no_std]` binaries using `alloc`.
@@ -82,7 +82,7 @@ However, [`mem::uninitialized`] is an incredibly dangerous operation that essent
8282
cannot be used correctly as the Rust compiler assumes that values are properly initialized.
8383
For example, calling `mem::uninitialized::<bool>()` causes *instantaneous __undefined behavior__*
8484
as, from Rust's point of view, the uninitialized bits are neither `0` (for `false`)
85-
nor `1` (for `true`) -- the only two allowed bit patterns for `bool`.
85+
nor `1` (for `true`) - the only two allowed bit patterns for `bool`.
8686

8787
To remedy this situation, in Rust 1.36.0, the type [`MaybeUninit<T>`] has been [stabilized][pr-60445].
8888
The Rust compiler will understand that it should not assume that a [`MaybeUninit<T>`] is a properly initialized `T`.

0 commit comments

Comments
 (0)