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

println! does not find any variables inside non-linear async functions #983

Closed
sdroege opened this issue Apr 22, 2018 · 4 comments
Closed

Comments

@sdroege
Copy link
Contributor

sdroege commented Apr 22, 2018

See https://github.com/sdroege/gtk-rs-examples/blob/0f6c01eb18517d8db28633a54a5aded3341370fd/src/bin/gio_futures_await.rs#L49

That line fails to compile with

error[E0425]: cannot find value `idx` in this scope
 --> <println macros>:3:44
  |
3 | ) => ( print ! ( concat ! ( $ fmt , "\n" ) , $ ( $ arg ) * ) ) ;
  |                                            ^ not found in this scope

error[E0425]: cannot find value `buf` in this scope
 --> <println macros>:3:44
  |
3 | ) => ( print ! ( concat ! ( $ fmt , "\n" ) , $ ( $ arg ) * ) ) ;
  |                                            ^ not found in this scope

error[E0425]: cannot find value `len` in this scope
 --> <println macros>:3:44
  |
3 | ) => ( print ! ( concat ! ( $ fmt , "\n" ) , $ ( $ arg ) * ) ) ;
  |                                            ^ not found in this scope

error: aborting due to 3 previous errors

doing the same with a normal function as in the next line works fine though.

Unfortunately I was not able to reproduce this in a stand-alone testcase so far, it's not clear to me what exactly triggers it.

@Nemo157
Copy link
Member

Nemo157 commented Apr 22, 2018

Sounds very similar to alexcrichton/futures-await#95 which is caused by rust-lang/rust#50061

@sdroege
Copy link
Contributor Author

sdroege commented Apr 22, 2018

Yes that's most likely the same. Feel free to close this one

@sdroege
Copy link
Contributor Author

sdroege commented Apr 23, 2018

The next nightly should have this fixed, I'll close it once it is available for testing and if it's indeed fixed

@sdroege
Copy link
Contributor Author

sdroege commented Apr 30, 2018

Works now indeed, thanks!

@sdroege sdroege closed this as completed Apr 30, 2018
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

No branches or pull requests

2 participants