Rust's `Any` Trait Finally Supports Upcasting

2025-03-30
Rust's `Any` Trait Finally Supports Upcasting

Rust 1.86 has finally fixed a long-standing issue with the `Any` trait: the inability to upcast `dyn Any`. This means developers can now use methods from the `Any` trait, such as `downcast_ref`, on traits inheriting from `Any`. This fix eliminates the need for hacks previously required to achieve this functionality, improving code readability and maintainability. This is welcome news for Rust developers who have relied on these workarounds for years.

Development upcasting