-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Description
Code in question is https://github.com/gtk-rs/examples/blob/pending/src/bin/gio_futures_await.rs
You can build/run it with cargo +nightly run --features futures-nightly --bin gio_futures_await
, and it fails as follows
error: custom attribute panicked
--> src/bin/gio_futures_await.rs:23:1
|
23 | #[async]
| ^^^^^^^^
|
= help: message: unsupported character _
error: aborting due to previous error
With the previous nightly the same code compiled just fine. How can more debug information, like a backtrace, for the procedural macro? Just setting RUST_BACKTRACE=1
does not seem to be sufficient.
This is with futures 0.2 from crates.io
Activity
sdroege commentedon Apr 29, 2018
The same happens with latest GIT of futures and all related crates
ngg commentedon Apr 29, 2018
It seems to be unrelated to another current nightly breakage #994 😞
A workaround is possible to modify https://github.com/gtk-rs/examples/blob/pending/src/bin/gio_futures_await.rs#L55 to have
let _x = ...
instead oflet _ = ...
, but I don't understand why it doesn't work.cargo-expand
shows a seemingly valid macro expansion. You also need to enable theproc_macro_non_items
feature in that file but at least for that there is a straight-forward compiler error after you change_
to_x
.hcpl commentedon Apr 29, 2018
@sdroege
syn
0.13.3 fixed that with dtolnay/syn#411 and running the example works now.sdroege commentedon Apr 30, 2018
Thanks it indeed does now.
proc_macro_non_items
was not required before latest nightly though, but it is now.