]> git.lizzy.rs Git - rust.git/blob - src/libcore/tests/alloc.rs
Auto merge of #68351 - Centril:rollup-0gzuh0p, r=Centril
[rust.git] / src / libcore / tests / alloc.rs
1 use core::alloc::Layout;
2
3 #[test]
4 fn const_unchecked_layout() {
5     const SIZE: usize = 0x2000;
6     const ALIGN: usize = 0x1000;
7     const LAYOUT: Layout = unsafe { Layout::from_size_align_unchecked(SIZE, ALIGN) };
8     assert_eq!(LAYOUT.size(), SIZE);
9     assert_eq!(LAYOUT.align(), ALIGN);
10 }