Email me

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.

Jul 4, 2019release date
0language stabilizations
16APIs stabilized
-new edition

← 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::uninitialized use 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 it

To 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::Debug is now equivalent to dyn fmt::Debug + Send, where this was previously not the case.

Libraries

  • [HashMap's implementation has been replaced with hashbrown::HashMap implementation.][58623]
  • [TryFromSliceError now implements From<Infallible>.][60318]
  • [mem::needs_drop is now available as a const fn.][60364]
  • [alloc::Layout::from_size_align_unchecked is now available as a const fn.][60370]
  • [String now implements BorrowMut<str>.][60404]
  • [io::Cursor now implements Default.][60234]
  • [Both NonNull::{dangling, cast} are now const fns.][60244]
  • [The alloc crate is now stable.][59675] alloc allows you to use a subset of std (e.g. Vec, Box, Arc) in #![no_std] environments if the environment has access to heap memory allocation.
  • [String now implements From<&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 --offline flag 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::uninitialized use 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.

← Rust 1.35All versionsRust 1.37 →

Up next

Next releaseRust 1.37Released Aug 15, 2019.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ