Email me

Rust versions / 1.55

Rust release · Sep 9, 2021

Rust 1.55: what's new, what was stabilized

Short answerRust 1.55 was released on Sep 9, 2021: 18 newly stable APIs (Bound::cloned, Drain::as_str, IntoInnerError::into_error, IntoInnerError::into_parts, ...); 4 compatibility notes that can affect existing code.

Sep 9, 2021release date
0language stabilizations
18APIs stabilized
-new edition

← Rust 1.54All versionsRust 1.56 →

18 APIs stabilized

Bound::cloned, Drain::as_str, IntoInnerError::into_error, IntoInnerError::into_parts, MaybeUninit::assume_init_mut, MaybeUninit::assume_init_ref, MaybeUninit::write, array::map, ops::ControlFlow, x86::_bittest, x86::_bittestandcomplement, x86::_bittestandreset, x86::_bittestandset, x86_64::_bittest64, x86_64::_bittestandcomplement64, x86_64::_bittestandreset64, x86_64::_bittestandset64, str::from_utf8_unchecked

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:

  • [std functions that return an io::Error will no longer use the
  • [Using environment variable names with process::Command on Windows now
  • [Rustdoc will now warn on using rustdoc lints that aren't prefixed
  • RUSTFLAGS is no longer set for build scripts. Build scripts

Use it

rustup update stable        # get the newest release
rustup install 1.55          # or exactly this one
rustup override set 1.55     # pin a project to it

To require at least this version from users of your crate, set rust-version = "1.55" 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

  • [You can now write open "from" range patterns (X..), which will start at X and will end at the maximum value of the integer.][83918]
  • [You can now explicitly import the prelude of different editions through std::prelude (e.g. use std::prelude::rust_2021::*;).][86294]

Compiler

  • [Added tier 3\* support for powerpc64le-unknown-freebsd.][83572]

\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

  • [Updated std's float parsing to use the Eisel-Lemire algorithm.][86761] These improvements should in general provide faster string parsing of floats, no longer reject certain valid floating point values, and reduce the produced code size for non-stripped artifacts.
  • [string::Drain now implements AsRef<str> and AsRef<[u8]>.][86858]

Stabilized APIs

  • [Bound::cloned]
  • [Drain::as_str]
  • [IntoInnerError::into_error]
  • [IntoInnerError::into_parts]
  • [MaybeUninit::assume_init_mut]
  • [MaybeUninit::assume_init_ref]
  • [MaybeUninit::write]
  • [array::map]
  • [ops::ControlFlow]
  • [x86::_bittest]
  • [x86::_bittestandcomplement]
  • [x86::_bittestandreset]
  • [x86::_bittestandset]
  • [x86_64::_bittest64]
  • [x86_64::_bittestandcomplement64]
  • [x86_64::_bittestandreset64]
  • [x86_64::_bittestandset64]

The following previously stable functions are now const.

  • [str::from_utf8_unchecked]

Cargo

  • [Cargo will now deduplicate compiler diagnostics to the terminal when invoking rustc in parallel such as when using cargo test.][cargo/9675]
  • [The package definition in cargo metadata now includes the "default_run" field from the manifest.][cargo/9550]
  • [Added cargo d as an alias for cargo doc.][cargo/9680]
  • [Added {lib} as formatting option for cargo tree to print the "lib_name" of packages.][cargo/9663]

Rustdoc

  • [Added "Go to item on exact match" search option.][85876]
  • [The "Implementors" section on traits no longer shows redundant method definitions.][85970]
  • [Trait implementations are toggled open by default.][86260] This should make the implementations more searchable by tools like CTRL+F in your browser.
  • [Intra-doc links should now correctly resolve associated items (e.g. methods) through type aliases.][86334]
  • [Traits which are marked with #[doc(hidden)] will no longer appear in the "Trait Implementations" section.][86513]

Compatibility Notes

Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.

← Rust 1.54All versionsRust 1.56 →

Up next

Next releaseRust 1.56Released Oct 21, 2021.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