about summary refs log tree commit diff
path: root/library/std/src/sys/alloc/windows
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2024-07-23 16:10:08 +0200
committerjoboet <jonasboettiger@icloud.com>2024-08-27 11:58:19 +0200
commitd456814842e65a153a1de67960b892897a02ed14 (patch)
tree2b7f252cd52ba3e785fedea291fe3f78c1edf206 /library/std/src/sys/alloc/windows
parenta60a9e567a7319b33619f6551dc29522c6f58687 (diff)
downloadrust-d456814842e65a153a1de67960b892897a02ed14.tar.gz
rust-d456814842e65a153a1de67960b892897a02ed14.zip
std: move allocators to `sys`
Diffstat (limited to 'library/std/src/sys/alloc/windows')
-rw-r--r--library/std/src/sys/alloc/windows/tests.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/sys/alloc/windows/tests.rs b/library/std/src/sys/alloc/windows/tests.rs
new file mode 100644
index 00000000000..674a3e1d92d
--- /dev/null
+++ b/library/std/src/sys/alloc/windows/tests.rs
@@ -0,0 +1,9 @@
+use super::{Header, MIN_ALIGN};
+use crate::mem;
+
+#[test]
+fn alloc_header() {
+    // Header must fit in the padding before an aligned pointer
+    assert!(mem::size_of::<Header>() <= MIN_ALIGN);
+    assert!(mem::align_of::<Header>() <= MIN_ALIGN);
+}