SorteKanin@feddit.dk to Rust@programming.dev · 24 days agoAnnouncing Rust 1.99.0 | Rust Blogblog.rust-lang.orgexternal-linkmessage-square8linkfedilinkarrow-up135arrow-down10
arrow-up135arrow-down1external-linkAnnouncing Rust 1.99.0 | Rust Blogblog.rust-lang.orgSorteKanin@feddit.dk to Rust@programming.dev · 24 days agomessage-square8linkfedilink
minus-squarearendjr@programming.devlinkfedilinkarrow-up2·24 days agoAh yes, that makes sense. Curious what it points to then when empty…
minus-squareSorteKanin@feddit.dkOPlinkfedilinkarrow-up4·24 days agoI looked it up, it’s a pointer equal to the alignment of the type. So usually some small power of two.
minus-squarefil@programming.devlinkfedilinkarrow-up2·24 days agoVec::<u8>::new().as_ptr() = 0x0000000000000001 playground
Ah yes, that makes sense. Curious what it points to then when empty…
I looked it up, it’s a pointer equal to the alignment of the type. So usually some small power of two.
Vec::<u8>::new().as_ptr() = 0x0000000000000001playground