← Back to all releases

Rust 1.55.0

Released on September 9, 2021

What's Changed

  • [You can now write open "from" range patterns (X..), which will start at X and
  • [You can now explicitly import the prelude of different editions

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

  • [Updated std's float parsing to use the Eisel-Lemire algorithm.][86761]
  • [string::Drain now implements AsRef and AsRef<[u8]>.][86858]

  • [Cargo will now deduplicate compiler diagnostics to the terminal when invoking
  • [The package definition in cargo metadata now includes the "default_run"
  • [Added cargo d as an alias for cargo doc.][cargo/9680]
  • [Added {lib} as formatting option for cargo tree to print the "lib_name"

  • [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

  • [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]
  • [Added "Go to item on exact match" search option.][85876]
  • [The "Implementors" section on traits no longer shows redundant
  • [Trait implementations are toggled open by default.][86260] This should make the
  • [Intra-doc links should now correctly resolve associated items (e.g. methods)
  • [Traits which are marked with #[doc(hidden)] will no longer appear in the
Full Changelog

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 and AsRef<[u8]>.][86858]

Stabilised 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

-------------------

- [std functions that return an io::Error will no longer use the

ErrorKind::Other variant.][85746] This is to better reflect that these

kinds of errors could be categorised [into newer more specific ErrorKind

variants][79965], and that they do not represent a user error.

- [Using environment variable names with process::Command on Windows now

behaves as expected.][85270] Previously using environment variables with

Command would cause them to be ASCII-uppercased.

- [Rustdoc will now warn on using rustdoc lints that aren't prefixed

with rustdoc::][86849]

- RUSTFLAGS is no longer set for build scripts. Build scripts

should use CARGO_ENCODED_RUSTFLAGS instead. See the

documentation

for more details.

[86849]: https://github.com/rust-lang/rust/pull/86849

[86513]: https://github.com/rust-lang/rust/pull/86513

[86334]: https://github.com/rust-lang/rust/pull/86334

[86260]: https://github.com/rust-lang/rust/pull/86260

[85970]: https://github.com/rust-lang/rust/pull/85970

[85876]: https://github.com/rust-lang/rust/pull/85876

[83572]: https://github.com/rust-lang/rust/pull/83572

[86294]: https://github.com/rust-lang/rust/pull/86294

[86858]: https://github.com/rust-lang/rust/pull/86858

[86761]: https://github.com/rust-lang/rust/pull/86761

[85746]: https://github.com/rust-lang/rust/pull/85746

[85270]: https://github.com/rust-lang/rust/pull/85270

[83918]: https://github.com/rust-lang/rust/pull/83918

[79965]: https://github.com/rust-lang/rust/pull/79965

[cargo/9663]: https://github.com/rust-lang/cargo/pull/9663

[cargo/9675]: https://github.com/rust-lang/cargo/pull/9675

[cargo/9550]: https://github.com/rust-lang/cargo/pull/9550

[cargo/9680]: https://github.com/rust-lang/cargo/pull/9680

[array::map]: https://doc.rust-lang.org/stable/std/primitive.array.html#method.map

[Bound::cloned]: https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.cloned

[Drain::as_str]: https://doc.rust-lang.org/stable/std/string/struct.Drain.html#method.as_str

[IntoInnerError::into_error]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_error

[IntoInnerError::into_parts]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_parts

[MaybeUninit::assume_init_mut]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_mut

[MaybeUninit::assume_init_ref]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref

[MaybeUninit::write]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.write

[ops::ControlFlow]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html

[str::from_utf8_unchecked]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8_unchecked.html

[x86::_bittest]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittest.html

[x86::_bittestandcomplement]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandcomplement.html

[x86::_bittestandreset]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandreset.html

[x86::_bittestandset]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandset.html

[x86_64::_bittest64]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittest64.html

[x86_64::_bittestandcomplement64]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandcomplement64.html

[x86_64::_bittestandreset64]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandreset64.html

[x86_64::_bittestandset64]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandset64.html