Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

assert_disjoint

Function assert_disjoint 

Source
pub const fn assert_disjoint(regions: &[Region])
Expand description

Fail const evaluation when any two of regions overlap.

Pass every region that is live at one time, and call it in a const _ item so an overlap is a compile error rather than a corrupted frame.

ⓘ
use psx_rt::scratchpad::{assert_disjoint, Region};
const _: () = assert_disjoint(&[Region::new(0, 64), Region::new(32, 96)]);