rust/tests/ui/explicit-tail-calls/caller_is_track_caller.rs
Waffle Lapkin 992e3b4f03
fix tail call checks wrt #[track_caller]
only check the caller + disallow caller having the attr.
2025-02-06 21:06:51 +01:00

17 lines
336 B
Rust

#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]
#[track_caller]
fn a() {
become b(); //~ error: a function marked with `#[track_caller]` cannot perform a tail-call
}
fn b() {}
#[track_caller]
fn c() {
become a(); //~ error: a function marked with `#[track_caller]` cannot perform a tail-call
}
fn main() {}