Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
20747af8940cf683970e76ec9a433305940c05f3
rust/tests/ui/async-await/track-caller/async-block.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
188 B
Rust
Raw Normal View History

Support `#[track_caller]` on async closures
2022-12-02 17:17:31 +00:00
// edition:2021
Remove `identity_future` indirection This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
2022-11-24 17:58:32 +01:00
#![feature(stmt_expr_attributes)]
Support `#[track_caller]` on async closures
2022-12-02 17:17:31 +00:00
fn main() {
let _ = #[track_caller] async {
Remove `identity_future` indirection This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
2022-11-24 17:58:32 +01:00
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
Support `#[track_caller]` on async closures
2022-12-02 17:17:31 +00:00
};
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 485ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API