Post #2564788
2026-04-30 01:39 UTC
@Ambraven@social.mochi.academy `if … { f } else { &A::new() }` used to be impossible, but recent Rust versions actually allow that.
It automagically makes a variable in the outer scope of the `if`. It's supported only in certain syntactically-simple cases.
Replies (1)
-
@Ambraven@social.mochi.academy 2026-04-30 06:51
@kornel@mastodon.social Oh, that's cool!