about summary refs log tree commit diff
path: root/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
blob: 1246a3801fc36faf832d7b7f042507c8d33b413a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ run-pass
//@ ignore-pass
//@ ignore-backends: gcc
#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]

fn a(x: u32) -> u32 {
    become b(x);
    //~^ warning: tail calling a function marked with `#[track_caller]` has no special effect
}

#[track_caller]
fn b(x: u32) -> u32 { x + 42 }

fn main() {
    assert_eq!(a(12), 54);
}