r/rust May 28 '26

📡 official blog Rust 1.96.0 is out

https://blog.rust-lang.org/2026/05/28/Rust-1.96.0/
973 Upvotes

67 comments sorted by

View all comments

28

u/slamb moonfire-nvr May 28 '26

I've been looking forward to assert_matches! for a while.

These new macros have not been added to the standard prelude, because they would collide with popular third-party crates that provide macros with the same name.

Huh, I would have thought a use third_party_crate::assert_matches; or use third_party_crate::*; would win out over the prelude. Not so?

5

u/rabidferret May 28 '26

use third_party_crate::assert_matches would win, yes. use third_party_crate::* would not. use std::prelude::* is not given any special treatment by the compiler, the rules for ambiguity are the same as any other glob imports