Mara Bos
Mara Bos

@m_ou_se

6 Tweets 4 reads Feb 06, 2023
๐Ÿ†•๐Ÿฆ€ Yet another version of @rustlang, Rust 1.67.0, has just been released!
This one is a relatively small release. So, short release thread:
๐Ÿงต 1/6
A must_use attribute on async functions now does what you expect.
#[must_use]
async fn hey() -> Thing { โ€ฆ }
Now, #[must_use] applies to `Thing`, instead of to the `impl Future<Output=Thing>` (which wasn't very useful).
2/6
std::sync::mpsc has a new implementation, based on crossbeam-channel.
The old implementation had some issues and was hard to maintain. The new implementation fixes some small but long-standing bugs and has better performance.
(The public interface remains unchanged.)
3/6
The integer types now have (integer) logarithm methods: ilog, ilog10, ilog2. (And zero-checking versions: checked_ilog, checked_ilog10, and checked_ilog2.)
ilog2 is implemented using leading_zeros(), so is very efficient.
All of these methods usable in const context too.
4/6
Clippy has a number of exciting new lints: #new-lints" target="_blank" rel="noopener" onclick="event.stopPropagation()">github.com
For example, you can now enable #![warn(clippy::manual_let_else)] to tell you about some situations where you could use the recently introduced let-else syntax.
5/6
For more details and a complete list of changes in Rust 1.67, check out the announcement and release notes:
Announcement: blog.rust-lang.org
Release notes:
Rust: #version-1670-2023-01-26" target="_blank" rel="noopener" onclick="event.stopPropagation()">github.com
Cargo: #cargo-167-2023-01-26" target="_blank" rel="noopener" onclick="event.stopPropagation()">github.com
Clippy: #rust-167" target="_blank" rel="noopener" onclick="event.stopPropagation()">github.com
Enjoy!
6/6

Loading suggestions...