Skip to content

async-await: mutually recursive functions compile sometimes #64004

Closed
@mb64

Description

@mb64

In the following code:

async fn rec_1() {
    rec_2().await;
}

async fn rec_2() {
    rec_1().await;
}

This gives an error when it is a part of a lib crate. However, as a part of a bin crate, it compiles.

Here's an erroneously compiling playground link and a correctly erroring playground link

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitAsyncAwait-PolishAsync-await issues that are part of the "polish" area

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions