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
e5565b1aaa6ec4a0edb08d2bcb09cf4bdae01b6d
rust/tests/ui/async-await/track-caller/async-block.rs

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: 340ms Template: 2ms
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