Rust 1.86 released with trait objects upcasting, borrow checker improvements, and more

Rust 1.86 released with trait objects upcasting, borrow checker improvements, and more

Rust has introduced version 1.86 of its programming language, featuring significant enhancements and bug fixes. A notable addition is the ability to upcast trait objects, allowing references to a trait object to be coerced to a supertrait object reference without requiring workaround methods. The borrow checker has also been improved to prevent simultaneous usage of references from repeated get_mut calls, with a new get_disjoint_mut helper introduced for safe mutable reference retrieval from slices and HashMap.

Additionally, the release stabilizes the target_feature_11 feature, enabling safe functions to be marked with the #[target_feature] attribute, previously reserved for unsafe functions. The compiler now includes debug assertions for non-null pointers during non-zero-sized reads, writes, and reborrowing. Furthermore, omitting the ABI in extern blocks and functions will now trigger a warning. Rust 1.86 also deprecates the i586-pc-windows-msvc target, and it will be removed in the next version of Rust. The update also includes stabilized APIs and various other enhancements and bug fixes.

by Paul

ma
OpenSourceSoftware
du
maxbar1 found this interesting
Rust iconRust
  147
  • ...

Rust is a multi-paradigm, general-purpose programming language designed with a focus on performance, type safety, and concurrency. It ensures memory safety by guaranteeing that all references point to valid memory without relying on a garbage collector. Key features include type safety, compiler explanations, and static typing. Rust is often compared to languages like Python, C++, and C. It holds a rating of 4.4.

No comments so far, maybe you want to be first?
Gu