Rust versions / 1.36
Rust release · Jul 4, 2019
Rust 1.36: what's new, what was stabilized
Short answerRust 1.36 was released on Jul 4, 2019: 16 newly stable APIs (VecDeque::rotate_left, VecDeque::rotate_right, Iterator::copied, io::IoSlice, ...); 1 compatibility note that can affect existing code.
← Rust 1.35All versionsRust 1.37 →
16 APIs stabilized
VecDeque::rotate_left, VecDeque::rotate_right, Iterator::copied, io::IoSlice, io::IoSliceMut, Read::read_vectored, Write::write_vectored, str::as_mut_ptr, mem::MaybeUninit, pointer::align_offset, future::Future, task::Context, task::RawWaker, task::RawWakerVTable, task::Waker, task::Poll
Can it break my build?
The release lists these compatibility notes. Most only affect rare code, but read them before you raise your toolchain in CI:
- With the stabilisation of
mem::MaybeUninit,mem::uninitializeduse is no
Use it
rustup update stable # get the newest release
rustup install 1.36 # or exactly this one
rustup override set 1.36 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.36" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.
Full release notes
Language
- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
- [The order of traits in trait objects no longer affects the semantics of that object.][59445] e.g.
dyn Send + fmt::Debugis now equivalent todyn fmt::Debug + Send, where this was previously not the case.
Libraries
- [
HashMap's implementation has been replaced withhashbrown::HashMapimplementation.][58623] - [
TryFromSliceErrornow implementsFrom<Infallible>.][60318] - [
mem::needs_dropis now available as a const fn.][60364] - [
alloc::Layout::from_size_align_uncheckedis now available as a const fn.][60370] - [
Stringnow implementsBorrowMut<str>.][60404] - [
io::Cursornow implementsDefault.][60234] - [Both
NonNull::{dangling, cast}are now const fns.][60244] - [The
alloccrate is now stable.][59675]allocallows you to use a subset ofstd(e.g.Vec,Box,Arc) in#![no_std]environments if the environment has access to heap memory allocation. - [
Stringnow implementsFrom<&String>.][59825] - [You can now pass multiple arguments to the
dbg!macro.][59826]dbg!will return a tuple of each argument when there is multiple arguments. - [
Result::{is_err, is_ok}are now#[must_use]and will produce a warning if not used.][59648]
Stabilized APIs
- [
VecDeque::rotate_left] - [
VecDeque::rotate_right] - [
Iterator::copied] - [
io::IoSlice] - [
io::IoSliceMut] - [
Read::read_vectored] - [
Write::write_vectored] - [
str::as_mut_ptr] - [
mem::MaybeUninit] - [
pointer::align_offset] - [
future::Future] - [
task::Context] - [
task::RawWaker] - [
task::RawWakerVTable] - [
task::Waker] - [
task::Poll]
Cargo
- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
- [You can now pass the
--offlineflag to run cargo without accessing the network.][cargo/6934]
You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].
Clippy
There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.
Compatibility Notes
- With the stabilisation of
mem::MaybeUninit,mem::uninitializeduse is no longer recommended, and will be deprecated in 1.39.0.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.37Released Aug 15, 2019.Read it next →Also worth your time
Did this answer your question?