mirror of https://github.com/rust-lang/rust
18 lines
301 B
Rust
18 lines
301 B
Rust
//@ compile-flags: -g -Cstrip=none -Cforce-frame-pointers=yes
|
|
|
|
#[inline(never)]
|
|
pub fn callback<F>(f: F)
|
|
where
|
|
F: FnOnce((&'static str, u32)),
|
|
{
|
|
f((file!(), line!()))
|
|
}
|
|
|
|
#[inline(always)]
|
|
pub fn callback_inlined<F>(f: F)
|
|
where
|
|
F: FnOnce((&'static str, u32)),
|
|
{
|
|
f((file!(), line!()))
|
|
}
|