Get the latest tech news

Rust Any part 3: we have upcasts


Some good news is coming in Rust 1.86

Three years ago I shared the As-Any Hack on this blog. So while you could call DebugAny methods just fine, trying to use downcast_ref from Any(the reason to use Any in the first place) would fail: At the time of writing, this fix is in the beta channel, but stable release is just around the corner.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of upcasts

upcasts