summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-closure_track_caller.rs
blob: a4c91f3bc1880334506cb6a564a65bc2e1a07661 (plain)
1
2
3
4
5
6
7
8
9
// edition:2021
#![feature(stmt_expr_attributes)]
#![feature(generators)]

fn main() {
    let _closure = #[track_caller] || {}; //~ `#[track_caller]` on closures
    let _generator = #[track_caller] || { yield; }; //~ `#[track_caller]` on closures
    let _future = #[track_caller] async {}; //~ `#[track_caller]` on closures
}