Elektrine lite

โ† Feed

@janriemer@floss.social

Post #1398737

2023-11-25 19:24 UTC

*makes some happy screaming noise* :awesome: :ferris: #Rust will end this year with a long awaited feature that will define it's future: We will get "async fn and return-position impl Trait in trait" (#AFIT & #RPITIT). It will be stabilized in the next #RustLang version 1.75, which will be released on 28 December, 2023. https://releases.rs/docs/1.75.0/ PR: https://github.com/rust-lang/rust/pull/115822 Thank you Rust #community for all of your hard work! โค๏ธ #RustAsync #AsyncRust

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

    Open ##2612501

  • @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.

    Open ##2612502