Skip to content

#[async] panics with latest nightly (66363b288 2018-04-28) #992

@sdroege

Description

@sdroege
Contributor

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

sdroege commented on Apr 29, 2018

@sdroege
ContributorAuthor

The same happens with latest GIT of futures and all related crates

ngg

ngg commented on Apr 29, 2018

@ngg
Contributor

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 of let _ = ..., but I don't understand why it doesn't work. cargo-expand shows a seemingly valid macro expansion. You also need to enable the proc_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

hcpl commented on Apr 29, 2018

@hcpl
Contributor

@sdroege syn 0.13.3 fixed that with dtolnay/syn#411 and running the example works now.

sdroege

sdroege commented on Apr 30, 2018

@sdroege
ContributorAuthor

Thanks it indeed does now. proc_macro_non_items was not required before latest nightly though, but it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sdroege@ngg@hcpl

        Issue actions

          #[async] panics with latest nightly (66363b288 2018-04-28) · Issue #992 · rust-lang/futures-rs