Post #1398737
2023-11-25 19:24 UTC
Replies (2)
-
@janriemer@floss.social 2023-12-02 19:15
Whoop! ๐ Continuing this series, we'll (very likely) get `dyn (trait) upcasting` in #Rust 1.76! :awesome: ๐ก I've accidentally stumbled upon this (๐), while trying to answer @luna@lunar.place's question here: https://floss.social/@luna@lunar.place/111511081757642056 It basically allows you to upcast trait objects. See the original RFC (with some nice examples on when you need this)...: https://github.com/rust-lang/rfcs/blob/master/text/3324-dyn-upcasting.md ...and it's tracking issue: https://github.com/rust-lang/rust/issues/65991 #RustLang
-
@matze@mastodon.social 2023-11-25 21:18
@janriemer@floss.social unfortunately, AFIT is often not that helpful because it's not possible to specify Send bounds, so you probably end up writing the desugared version anyway. But yes, without RPITIT, this would not be possible at all.