about summary refs log tree commit diff
path: root/library/core/tests/alloc.rs
AgeCommit message (Collapse)AuthorLines
2025-01-26Put all coretests in a separate cratebjorn3-75/+0
2024-02-21rename ptr::invalid -> ptr::without_provenanceRalf Jung-1/+1
also introduce ptr::dangling matching NonNull::dangling
2022-07-13Re-optimize `Layout::array`Scott McMurray-0/+44
This way it's one check instead of two, so hopefully it'll be better Nightly: ``` layout_array_i32: movq %rdi, %rax movl $4, %ecx mulq %rcx jo .LBB1_2 movabsq $9223372036854775805, %rcx cmpq %rcx, %rax jae .LBB1_2 movl $4, %edx retq .LBB1_2: … ``` This PR: ``` movq %rcx, %rax shrq $61, %rax jne .LBB2_1 shlq $2, %rcx movl $4, %edx movq %rcx, %rax retq .LBB2_1: … ```
2022-06-27libcore tests: avoid int2ptr castsRalf Jung-2/+2
2022-04-11fix Layout struct member naming styleliangyongrui-1/+1
2022-04-08Make non-power-of-two alignments a validity error in `Layout`Scott McMurray-0/+18
Inspired by the zulip conversation about how `Layout` should better enforce `size < isize::MAX as usize`, this uses an N-variant enum on N-bit platforms to require at the validity level that the existing invariant of "must be a power of two" is upheld. This was MIRI can catch it, and means there's a more-specific type for `Layout` to store than just `NonZeroUsize`.
2020-07-27mv std libs to library/mark-0/+13