The Rust team has officially released a new version of Rust 1.55.0. If you have previously installed a previous version of Rust via rustup, you can upgrade to the latest version by running the following command.
|
|
Updates in the 1.55.0 stable release include
Cargo repeats compiler error
In past versions, when running cargo test
, cargo check --all-targets
, or similar commands to build the same Rust crate in multiple configurations, errors and warnings may be repeated because rustc runs in parallel and all display the same warnings.
For example, in 1.54.0, output like this is common.
|
|
In version 1.55, this behavior has been adjusted to repeat and print a report at the end of compilation:
|
|
Faster and more accurate floating point resolution
The floating-point parsing implementation of the standard library has been updated to use the Eisel-Lemire algorithm, which brings speedups and improved correctness. In the past, certain edge cases could not be parsed, but this has now been fixed.
std::io::ErrorKind variant has been updated
std::io::ErrorKind
is a #[non_exhaustive]
enumeration that classifies errors into portable categories, such as NotFound
or WouldBlock
. Rust code that has std::io::Error
can call the kind
method to get std::io::ErrorKind
and match on top of that to handle a particular error.
Not all errors are categorized as ErrorKind
values; some errors are not categorized and are placed in a catch-all variant. In previous versions of Rust, unclassified errors used ErrorKind::Other
; however, user-created std::io::Error
values also typically use ErrorKind::Other
. In 1.55, uncategorized errors now use the internal variant ErrorKind::Uncategorized
; this allows ErrorKind::Other
to be used exclusively to construct std::io::Error
values that do not come from the standard library.
Open range mode has been added
Rust 1.55 stabilizes the use of open ranges in schemas:
Stable API
The following methods and implementations of properties are 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]( )
The formerly stable function is now const
[str::from_utf8_unchecked]( )
Additional changes in the Rust 1.55.0 release can be viewed at: https://blog.rust-lang.org/2021/09/09/Rust-1.55.0.html