Skip to main content

## TAIL_CALL_TRACK_CALLER

# Static TAIL_CALL_TRACK_CALLER

Source

    pub static TAIL_CALL_TRACK_CALLER: &Lint

Expand description

The `tail_call_track_caller` lint detects usage of `become` attempting to tail call a function marked with `#[track_caller]`.

#### §Example

    #![feature(explicit_tail_calls)]
    #![expect(incomplete_features)]

    #[track_caller]
    fn f() {}

    fn g() {
        become f();
    }

    g();

{{produces}}

#### §Explanation

Due to implementation details of tail calls and `#[track_caller]` attribute, calls to functions marked with `#[track_caller]` cannot become tail calls. As such using `become` is no different than a normal call (except for changes in drop order).