diff options
Diffstat (limited to 'tests/ui/async-await/track-caller/async-block.rs')
-rw-r--r-- | tests/ui/async-await/track-caller/async-block.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/async-await/track-caller/async-block.rs b/tests/ui/async-await/track-caller/async-block.rs index 8ddd4ab11..24711b966 100644 --- a/tests/ui/async-await/track-caller/async-block.rs +++ b/tests/ui/async-await/track-caller/async-block.rs @@ -1,9 +1,27 @@ // edition:2021 +// revisions: afn nofeat #![feature(stmt_expr_attributes)] +#![cfg_attr(afn, feature(async_fn_track_caller))] fn main() { let _ = #[track_caller] async { //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658] }; } + +#[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] + }; + }; +} |