Module core::ub_checks

source ·
🔬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 intrinsics::ub_checks as check_library_ub;
    Experimental

Macros§

  • Check that the preconditions of an unsafe function are followed. The check is enabled at runtime if debug assertions are enabled when the caller is monomorphized. In const-eval/Miri checks implemented with this macro for language UB are always ignored.