about summary refs log tree commit diff
path: root/library/core/tests/mem.rs
AgeCommit message (Collapse)AuthorLines
2025-01-26Put all coretests in a separate cratebjorn3-797/+0
2025-01-11Add inherent versions of MaybeUninit methods for slicesltdk-16/+16
2024-09-09fix UB in a testRalf Jung-1/+6
also add an explicit test for the fact that a Option<WidePtr> has padding when it is None
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+0
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-29[ACP 362] genericize `ptr::from_raw_parts`Scott McMurray-2/+2
2024-03-05Implement MaybeUninit::fill{,_with,_from}Andrew Wock-6/+211
ACP: rust-lang/libs-team#156 Signed-off-by: Andrew Wock <ajwock@gmail.com>
2023-11-11Rename MaybeUninit::write_sliceKornel-8/+8
#79995
2023-11-04Stabilize `const_maybe_uninit_zeroed`Trevor Gross-0/+21
Make `MaybeUninit::zeroed` const stable. Newly stable API: // core::mem impl<T> MaybeUninit<T> { pub const fn zeroed() -> MaybeUninit<T>; } Use of `const_mut_refs` should be acceptable since we do not leak the mutability. Tracking issue: #91850
2023-05-30Bump to latest beta compilerMark Rousskov-10/+1
2023-05-20don't skip inference for type in `offset_of!`Lukas Markeffsky-0/+5
2023-05-18Add more tests for the offset_of!() macroest31-0/+15
* ensuring that offset_of!(Self, ...) works iff inside an impl block * ensuring that the output type is usize and doesn't coerce. this can be changed in the future, but if it is done, it should be a conscious descision * improving the privacy checking test * ensuring that generics don't let you escape the unsized check
2023-04-21major test improvementsDrMeepster-14/+109
2023-04-21fmtDrMeepster-1/+1
2023-04-21fix incorrect param env in dead code lintDrMeepster-1/+1
2023-04-21test improvementsDrMeepster-0/+21
2023-04-21offset_ofDrMeepster-0/+74
2022-12-28Update bootstrap cfgPietro Albini-1/+0
2022-10-29interpret: fix align_of_val on packed typesRalf Jung-0/+20
2022-10-19Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input ↵Thom Chiovoloni-1/+5
vs output
2022-10-17Remove all uses of array_assume_initAlex Saveau-3/+3
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-07-03Add size assert in transmute_copy5225225-0/+40
2021-11-28Add test for const `MaybeUninit`Jacob Pratt-0/+32
2021-07-03Remove the deprecated `core::raw` and `std::raw` module.Charles Lew-22/+0
2021-04-15Allow use of deprecated std::raw in a test for that featureSimon Sapin-0/+3
2021-02-20Update the bootstrap compilerJoshua Nelson-1/+0
Note this does not change `core::derive` since it was merged after the beta bump.
2021-01-27Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrayshyd-dev-0/+2
2021-01-01Format codeCoffeeBlend-4/+2
2021-01-01Add test for MaybeUninit::array_assume_initCoffeeBlend-0/+16
2020-12-30Auto merge of #80511 - Mark-Simulacrum:bump-stage0, r=pietroalbinibors-1/+0
Bump bootstrap compiler to 1.50 beta r? `@pietroalbini`
2020-12-30Bump bootstrap compiler to 1.50 betaMark Rousskov-1/+0
2020-12-26Add testsAlbin Hedman-0/+7
2020-12-18Fix unused import error on wasmDrMeepster-0/+1
2020-12-17fix memory leak in testDrMeepster-5/+10
2020-12-15write_slice(_cloned)DrMeepster-0/+124
2020-12-06Moved failing test to src/test/ui/Albin Hedman-10/+1
Still have not figured out how to make it work
2020-12-05Still unable to get the tests workingAlbin Hedman-7/+6
2020-12-05Fix tests (hopefully)Albin Hedman-2/+2
2020-12-02Added tests for assume_initAlbin Hedman-0/+18
2020-07-27mv std libs to library/mark-0/+131