๐ฌThis is a nightly-only experimental API. (
ub_checks
)Expand description
Provides the assert_unsafe_precondition
macro as well as some utility functions that cover
common preconditions.
Re-exportsยง
pub use assert_unsafe_precondition;
Experimental pub use intrinsics::ub_checks as check_library_ub;
Experimental
Functionsยง
- check_
language_ ๐ub Experimental - Determines whether we should check for language UB.
- is_
valid_ ๐allocation_ size Experimental - maybe_
is_ ๐aligned_ and_ not_ null Experimental - Checks whether
ptr
is properly aligned with respect to the given alignment, and ifis_zst == false
, thatptr
is not null. - maybe_
is_ ๐nonoverlapping Experimental - Checks whether the regions of memory starting at
src
anddst
of sizecount * size
do not overlap.