Closed shisoft closed 6 years ago
It's caused by https://github.com/rust-lang/rust/pull/49194
@alexcrichton can you pls release a new version that fixes this but without depending on proc-macro2 0.2 nightly? (that would cause lots of other problems) The best would be a 0.1.1 version that "just" fixes this but otherwise works the same as 0.1.0?
Thanks!
I have a branch where I cherry-picked all commits that are not 0.2 specific, I use it currently until a fixed version is in cargo: https://github.com/ngg/futures-await/commits/0.1
futures-await = { git = "https://github.com/ngg/futures-await", branch = "0.1", version = "0.1" }
@ngg for some reason I got this error while using your version:
error: custom attribute panicked
--> src\server.rs:403:1
|
403 | #[async]
| ^^^^^^^^
|
= help: message: failed to parse tokens as a function: ParseError(Some("failed to parse item: failed to parse"))
error: aborting due to previous error
@bbigras It's strange... Did it work with the official 0.1.0 version? Can you send a file for which it fails (or a link to some crate it does not work with)?
@alexcrichton having 0.1.1 would sure be a good thing to have as it would take some time for everyone to move to futures 0.2 which is a prereq for futures-await master.
For now it would be possible to just throw the two lines that error in an unsafe block, i'm not sure why resuming generators are now unsafe or if this would have a negative impact on futures-await, but it seems like an easy fix.
Resuming generators is now unsafe because the generator may or may not be an immovable generator. For futures-await
0.1 your fine though because it only creates movable generators, so just wrapping the resume calls in unsafe blocks is valid.
nice to know, thanks
Using @ngg's branch solved this. Could you please send a pull request here and get 0.1.1 released? The current situation is no good.
This change has broken a lot of crates, mine included. What's preventing this issue from being closed? happy to help out where i can.
Sorry about being broken for so long! Everyone involved in maintaining this crate has been pretty busy with other things.
Now that the 0.2 version has been upstreamed into rust-lang-nursery/futures-rs, I think I'm going to revert this repo to just track version 0.1. Then we can merge a fix for this in & upload an 0.1.1 version.
If anyone wants to take #86 over and get it passing CI, I will gladly merge it & release 0.1.1. Otherwise I will eventually get it to pass CI hopefully this week some time.
Uploaded futures-await 0.1.1 which should work on current nightlies :tada:
Thanks a lot, it works perfectly :)
Hi. I use nightly rust on my project and got this compile error today after rustup update.
Is there anything need to be upgraded?
Thanks