cvlr_asserts/
log.rs

1mod rt_decls {
2    extern "C" {
3        #![allow(improper_ctypes)]
4        // duplicated to avoid cvlr-assert depend on any other cvlr crate
5        pub fn CVT_calltrace_attach_location(file: &str, line: u64);
6    }
7}
8
9#[inline(always)]
10pub fn add_loc(file: &str, line: u32) {
11    unsafe {
12        rt_decls::CVT_calltrace_attach_location(file, line as u64);
13    }
14}
15
16#[macro_export]
17macro_rules! add_loc {
18    () => {
19        $crate::log::add_loc(core::file!(), core::line!());
20    };
21}