bytemuck/tests
zachs18 4c37652113
Implement CheckedBitPattern for core::num::NonZero*. (#151)
* Implement CheckedBitPattern for core::num::NonZero*.

* Add tests for CheckedBitPattern.

* Fix stacked borrows violation.

`<&mut T>::as_ptr` gives a `*const T` which is read-only. `<&mut T>::as_mut_ptr` is necessary to get a `*mut T`.

* MSRV fix.

* Add layout checks for CheckedBitPattern for NonZero*.

(Until Rust guarantees the layout of NonZero[int] matches [int].)
Also adds a test that will fail if any NonZero[int] has a different size or alignment than [int].
2022-11-30 12:09:17 -07: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 [Feature] extend TransparentWrapper conversion functions (#58) 2021-03-28 23:11:13 -06:00
checked_tests.rs Implement CheckedBitPattern for core::num::NonZero*. (#151) 2022-11-30 12:09:17 -07:00
derive.rs Remove where clause from derived TransparentWrapper impls. (#146) 2022-11-20 16:40:20 -07:00
doc_tests.rs Duplicate the doctests for the sake of miri 2020-01-11 08:01:58 -08:00
offset_of_tests.rs update offset_of to have 2-arg and 3-arg versions. 2020-07-23 20:21:09 -06:00
std_tests.rs Prevent try_zeroed_box<T>() from reserving size_of<T>() space on the stack. (#43) 2020-10-21 14:11:09 -06: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