2022-12-02 11:17:31 -06:00
|
|
|
// edition:2021
|
2023-05-30 16:32:29 -05:00
|
|
|
// revisions: afn nofeat
|
2022-12-02 11:17:31 -06:00
|
|
|
|
2022-11-24 10:58:32 -06:00
|
|
|
#![feature(stmt_expr_attributes)]
|
2023-05-30 16:32:29 -05:00
|
|
|
#![cfg_attr(afn, feature(async_fn_track_caller))]
|
2022-12-02 11:17:31 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = #[track_caller] async {
|
2022-11-24 10:58:32 -06:00
|
|
|
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
|
2022-12-02 11:17:31 -06:00
|
|
|
};
|
|
|
|
}
|
2023-05-30 16:32:29 -05:00
|
|
|
|
|
|
|
#[track_caller]
|
|
|
|
async fn foo() {
|
|
|
|
let _ = #[track_caller] async {
|
|
|
|
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#[track_caller]
|
|
|
|
async fn foo2() {
|
|
|
|
let _ = async {
|
|
|
|
let _ = #[track_caller] async {
|
|
|
|
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|