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

async-await: mutually recursive functions compile sometimes #64004

mb64 opened this issue Aug 29, 2019 · 2 comments

async-await: mutually recursive functions compile sometimes #64004

mb64 opened this issue Aug 29, 2019 · 2 comments


Copy link

@mb64 mb64 commented Aug 29, 2019

In the following code:

async fn rec_1() {

async fn rec_2() {

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

Copy link

@matprec matprec commented Aug 29, 2019

I guess that's because in the binary, it knows that it will be unused. If you were to actually use it, it errors


Copy link

@cramertj cramertj commented Aug 30, 2019

Tagging as blocking because fixing this is a potential future-compat hazard.


Centril added a commit to Centril/rust that referenced this issue Sep 5, 2019
…t-recursion, r=varkor

Check impl trait substs when checking for recursive types

closes rust-lang#64004
@bors bors closed this in 9024032 Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants