-
Notifications
You must be signed in to change notification settings - Fork 13.3k
stack overflow while compiling async recursion #140725
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
Labels
A-async-await
Area: Async & Await
C-bug
Category: This is a bug.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
huh, some obvious recursion but otherwise I think that's a genuinely novel report. fascinating! thanks! |
rustc printed a nice error message prior to nightly-2024-01-10 (1.77.0): error[E0733]: recursion in an `async fn` requires boxing
--> src\lib.rs:7:1
|
7 | pub async fn f2<T>(stream: T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
|
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
For more information about this error, try `rustc --explain E0733`.
error: could not compile `mycrate` (lib) due to 1 previous error PRs in nightly-2024-01-10
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-async-await
Area: Async & Await
C-bug
Category: This is a bug.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Compiler encounters segfault when compiling the below code
Code
Meta
Error output
Stable
Nightly
The text was updated successfully, but these errors were encountered: