# Pastebin sdXJVubn // run-pass #![feature(track_caller)] #![allow(unused)] fn ptr_call(f: fn()) { f(); } fn pass_to_ptr_call(f: fn(T), x: T) { f(x); } #[track_caller] fn tracked() { dbg!(std::panic::Location::caller()); } #[track_caller] fn tracked_unit(_: ()) { dbg!(std::panic::Location::caller()); } fn main() { // pass_to_ptr_call(tracked_unit, ()); // ptr_call(tracked); }