bytemuck/tests
zachs18 291a924518
Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256)
Casting ZST to non-ZST will result in a slice length of 0.
Casting non-ZST to ZST will only work if the input slice has length 0, and results in a slice length of 0; if the input slice is not of length 0, PodCastError::OutputSliceWouldHaveSlop is returned.

Updates the docs of the PodCastError variants to reflect when they can occur.
Updates the docs of try_cast_slice (and checked::) to remove note about ZST <-> non-ZST not being allowed.
Update bytes_of(_mut) to remove ZST check, since casting [ZST] -> [u8] is now allowed directly using cast_slice(_mut).
Update must_cast_slice checks and doctests to allow [ZST] -> [non-ZST], but disallow [non-ZST] -> [ZST].
2024-07-30 17:05:11 -06:00
..
array_tests.rs Attach min_const_generics to a crate feature (#63) 2021-06-05 08:25:57 -06:00
cast_slice_tests.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
checked_tests.rs tell clippy to quiet down 2023-09-05 13:26:08 -06:00
derive.rs Fix soundness issue of TransparentWrapper derive macro. (#173) 2023-02-17 12:24:16 -07:00
doc_tests.rs clear up some warnings in tests. 2024-02-08 22:09:44 -07:00
offset_of_tests.rs Fix 177 (#178) 2023-02-28 13:29:34 -07:00
std_tests.rs clear up some warnings in tests. 2024-02-08 22:09:44 -07:00
transparent.rs Conditionally compile in Arc (#140) 2022-11-05 07:00:40 -06:00
wrapper_forgets.rs Replace unsound usage of transmute_copy (#72) 2021-07-22 23:12:56 -06:00