#[track_caller] requires functions to have the "Rust" ABI for implicitly receiving caller location. See RFC 2091 for details on this and other restrictions.

Erroneous code example:

#![feature(track_caller)]

#[track_caller]
extern "C" fn foo() {}