SorteKanin@feddit.dk to Rust@programming.dev · 22 days agoAnnouncing Rust 1.99.0 | Rust Blogblog.rust-lang.orgexternal-linkmessage-square7linkfedilinkarrow-up134
arrow-up134external-linkAnnouncing Rust 1.99.0 | Rust Blogblog.rust-lang.orgSorteKanin@feddit.dk to Rust@programming.dev · 22 days agomessage-square7linkfedilink
minus-squarearendjr@programming.devlinkfedilinkarrow-up2·22 days agoAh yes, that makes sense. Curious what it points to then when empty…
minus-squareSorteKanin@feddit.dkOPlinkfedilinkarrow-up4·22 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·22 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