The Rust team recently released a new version of Rust 1.67.0. The main updates in the 1.67.0 stable version are as follows:
#[must_use]
right async fn
efficient
with #[must_use]
Annotated async
The function now applies that attribute to the returned impl Future
Output.Future
The feature itself already has #[must_use]
annotation, so all implementations Future
types are automatically #[must_use]
.
As of version 1.67, the compiler now warns if the output is not used in some way.
#[must_use]
async fn bar() -> u32 { 0 }
async fn caller() {
bar().await;
}
warning: unused output of future returned by `bar` that must be used
--> src/lib.rs:5:5
|
5 | bar().await;
| ^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
std::sync::mpsc
implement update
Rust’s standard library has had a multi-producer, single-consumer channel since before 1.0, but in this version the implementation has been replaced with one based on crossbeam-channel
. This release contains no API changes, but the new implementation fixes some bugs and improves the performance and maintainability of the implementation.
Users should not notice any noticeable change in behavior from this release onwards.
stable API
[{integer}::checked_ilog]()
[{integer}::checked_ilog2]()
[{integer}::checked_ilog10]()
[{integer}::ilog]()
[{integer}::ilog2]()
[{integer}::ilog10]()
[NonZeroU*::ilog2]()
[NonZeroU*::ilog10]()
[NonZero*::BITS]()
These APIs are now stable in const:
[char::from_u32]()
[char::from_digit]()
[char::to_digit]()
[core::char::from_u32]()
[core::char::from_digit]()
More details can be found at: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html
#Rust #released #News Fast Delivery