2022-12-02 17:17:31 +00:00
|
|
|
// edition:2021
|
2023-05-30 14:32:29 -07:00
|
|
|
// revisions: afn nofeat
|
2022-12-02 17:17:31 +00:00
|
|
|
|
2022-11-24 17:58:32 +01:00
|
|
|
#![feature(stmt_expr_attributes)]
|
2023-05-30 14:32:29 -07:00
|
|
|
#![cfg_attr(afn, feature(async_fn_track_caller))]
|
2022-12-02 17:17:31 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = #[track_caller] async {
|
2022-11-24 17:58:32 +01:00
|
|
|
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
|
2022-12-02 17:17:31 +00:00
|
|
|
};
|
|
|
|
}
|
2023-05-30 14:32:29 -07: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]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|