use core::ffi::c_void;
macro_rules! absent_computed {
($($ident:ident),+ $(,)?) => {
pastey::paste! {
$(
#[doc = concat!("Absent `", stringify!($ident), "` computed reader.")]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn [< waterui_read_computed_ $ident >](
_computed: *const c_void,
) -> *mut c_void {
absent(stringify!($ident))
}
#[doc = concat!("Absent `", stringify!($ident), "` computed watcher.")]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn [< waterui_watch_computed_ $ident >](
_computed: *const c_void,
_watcher: *mut c_void,
) -> *mut c_void {
absent(stringify!($ident))
}
#[doc = concat!("Absent `", stringify!($ident), "` computed drop.")]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn [< waterui_drop_computed_ $ident >](
_computed: *mut c_void,
) {
absent(stringify!($ident));
}
#[doc = concat!("Absent `", stringify!($ident), "` watcher constructor.")]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn [< waterui_new_watcher_ $ident >](
_data: *mut c_void,
_call: *mut c_void,
_drop: *mut c_void,
) -> *mut c_void {
absent(stringify!($ident))
}
)+
}
};
}
#[cold]
#[track_caller]
fn absent(entry: &str) -> ! {
panic!(
"waterui: `{entry}` was called in a build compiled without the `map` feature. \
Enable `map` on the `waterui` dependency, or stop calling it."
)
}
absent_computed!(region, annotations, user_location);