Also in Rust 1.86, HashMap
and slices now support indexing multiple elements mutably. The borrow checker prevents simultaneous usage of references obtained from repeated calls to get_mut
methods, the team said. To safely support this pattern, the standard library now provides a get_disjoint_mut
helper on slices and HashMap
to retrieve mutable references to multiple elements simultaneously.
The compiler in Rust 1.86, meanwhile, now will insert debug assertions that a pointer is not null upon non-zero-sized reads and writes, and also when the pointer is reborrowed into a reference, according to the Rust team. Rust 1.86 also stabilizes the target_feature_11
feature, allowing safe functions to be marked with the #[target_feature]
attribute. Additionally in Rust 1.86, omitting the ABI in extern blocks and functions (e.g. extern {}
and extern fn
) now results in a warning (via the missing_abi
lint).
The Rust team also said the tier-2 target i586-pc-windows-msvc
will be removed in the next version of Rust, Rust 1.87.0.