Rollup merge of #66254 - CAD97:patch-1, r=KodrAus
Make Layout::new const This seems like a reasonable change to make. If we don't provide `Layout::new::<T>` as `const`, then users can just instead do the more error prone `Layout::from_size_align_unchecked(mem::size_of::<T>(), mem::align_of::<T>())` for the same effect and an extra `unsafe { }` incantation.
Showing
想要评论请 注册 或 登录