Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse async closures #265

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

m4rch3n1ng
Copy link
Contributor

@m4rch3n1ng m4rch3n1ng commented Mar 6, 2025

parse async closures. see reference

i just added it as an optional modifier to the (closure_expression), like with async functions, instead of as a seperate node like (async_block), but i can change that if you want me to.

the reference doesn't specify how static closures work, but in my testing rustc does not want to give an ast for async static move, but gives an ast for static async move.

diff for #229:

this is actually a pretty substantial diff wow
--- .tmp/list.txt	2025-03-03 17:25:16.906975980 +0100
+++ .tmp/list.txt.async-closures	2025-03-03 17:19:07.415680818 +0100
@@ -1,4 +1,3 @@
-tests/codegen/async-closure-debug.rs
 tests/codegen/dst-offset.rs
 tests/codegen/function-arguments.rs
 tests/codegen/sanitizer/cfi/emit-type-metadata-id-itanium-cxx-abi-user-defined-types.rs
@@ -12,13 +11,11 @@
 tests/crashes/104685.rs
 tests/crashes/116979.rs
 tests/crashes/123887.rs
-tests/debuginfo/coroutine-closure.rs
 tests/debuginfo/coroutine-locals.rs
 tests/debuginfo/coroutine-objects.rs
 tests/debuginfo/function-names.rs
 tests/debuginfo/issue-57822.rs
 tests/debuginfo/type-names.rs
-tests/mir-opt/async_closure_shims.rs
 tests/mir-opt/building/match/never_patterns.rs
 tests/mir-opt/coroutine_drop_cleanup.rs
 tests/mir-opt/coroutine_storage_dead_unwind.rs
@@ -51,24 +48,10 @@
 tests/ui/associated-types/default-associated-types.rs
 tests/ui/associated-types/issue-25339.rs
 tests/ui/associated-types/issue-32350.rs
-tests/ui/async-await/async-closures/call-once-deduction.rs
-tests/ui/async-await/async-closures/constrained-but-no-upvars-yet.rs
-tests/ui/async-await/async-closures/different-projection-lengths-for-different-upvars.rs
-tests/ui/async-await/async-closures/implements-fnmut.rs
-tests/ui/async-await/async-closures/inline-body.rs
-tests/ui/async-await/async-closures/mac-body.rs
-tests/ui/async-await/async-closures/moro-example.rs
-tests/ui/async-await/async-closures/no-borrow-from-env.rs
-tests/ui/async-await/async-closures/sig-from-bare-fn.rs
-tests/ui/async-await/async-closures/signature-deduction.rs
-tests/ui/async-await/async-closures/signature-inference-from-two-part-bound.rs
-tests/ui/async-await/async-closures/truncated-fields-when-imm.rs
-tests/ui/async-await/async-closures/validate-synthetic-body.rs
 tests/ui/async-await/async-fn/sugar.rs
 tests/ui/async-await/for-await-passthrough.rs
 tests/ui/async-await/for-await.rs
 tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs
-tests/ui/async-await/no-params-non-move-async-closure.rs
 tests/ui/async-await/pin-ergonomics/sugar.rs
 tests/ui/async-await/return-type-notation/issue-110963-late.rs
 tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs
@@ -235,7 +218,6 @@
 tests/ui/macros/user-defined-macro-rules.rs
 tests/ui/match/postfix-match/no-unused-parens.rs
 tests/ui/match/postfix-match/pf-match-chain.rs
-tests/ui/mir/issue-68841.rs
 tests/ui/nll/assign-while-to-immutable.rs
 tests/ui/nll/empty-type-predicate.rs
 tests/ui/nll/issue-112604-closure-output-normalize.rs
@@ -257,7 +239,6 @@
 tests/ui/rust-2018/uniform-paths/from-decl-macro.rs
 tests/ui/rust-2024/unsafe-extern-blocks/extern-items.rs
 tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs
-tests/ui/sanitizer/cfi/async-closures.rs
 tests/ui/simd/masked-load-store.rs
 tests/ui/sized/coinductive-1-gat.rs
 tests/ui/specialization/assoc-ty-graph-cycle.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant