PSA: size_of and align_of are in the prelude since 1.80

138 points nightcracker

This wasn't mentioned in the 1.80 release notes so I and likely many others missed it, but yes, you don't have to type std::mem::size_of anymore, just size_of works now.

I've never used them but size_of_val and align_of_val are also now in the prelude.