snaggen@programming.dev to Rust@programming.dev · 2 years agoAnnouncing Rust 1.79.0blog.rust-lang.orgexternal-linkmessage-square3linkfedilinkarrow-up177arrow-down11
arrow-up176arrow-down1external-linkAnnouncing Rust 1.79.0blog.rust-lang.orgsnaggen@programming.dev to Rust@programming.dev · 2 years agomessage-square3linkfedilink
minus-squareBatmanAoD@programming.devlinkfedilinkarrow-up10·2 years agoHow does the const { None } example type-inference work? The size of the option type can’t be known without knowing the type of the Somevariant. Edit: aha, it doesn’t work as-is. It needs to infer the type of elements of foo from usage. https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=05a95c592626b6935ae812527aa6bbc6
How does the
const { None }example type-inference work? The size of the option type can’t be known without knowing the type of theSomevariant.Edit: aha, it doesn’t work as-is. It needs to infer the type of elements of
foofrom usage. https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=05a95c592626b6935ae812527aa6bbc6