Skip to content

cannot find macro proc_macro_call_0! in this scope #1808

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

Closed
fenhl opened this issue Aug 17, 2019 · 5 comments
Closed

cannot find macro proc_macro_call_0! in this scope #1808

fenhl opened this issue Aug 17, 2019 · 5 comments

Comments

@fenhl
Copy link

fenhl commented Aug 17, 2019

I'm hitting this error when trying to use futures::select on the latest nightly.

Minimal example

Cargo.toml:

[package]
name = "select-min"
version = "0.1.0"
edition = "2018"

[dependencies.futures-preview]
version = "=0.3.0-alpha.18"
features = ["async-await", "nightly"]

main.rs:

fn main() {
    futures::select! {}
}

Output of cargo +nightly check:

    Checking select-min v0.1.0 (C:\Users\Fenhl\Desktop\select-min)
error: cannot find macro `proc_macro_call_0!` in this scope
 --> src\main.rs:2:5
  |
2 |     futures::select! {}
  |     ^^^^^^^^^^^^^^^^^^^
  |
  = help: have you added the `#[macro_use]` on the module/import?
  = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

error: Could not compile `select-min`.

To learn more, run the command again with --verbose.

Adding #[macro_use] extern crate futures; does not fix this.

@Nemo157
Copy link
Member

Nemo157 commented Aug 17, 2019

Probably related to dtolnay/proc-macro-hack#40 and rust-lang/rust#63651, seems proc-macro-hack doesn't work on the latest nightlies. Easiest workaround for now is to go back a nightly or two.

@fenhl
Copy link
Author

fenhl commented Aug 17, 2019

Can confirm, the macro works fine on nightly-2019-08-15.

@lneicelis
Copy link

how to set nightly to specific version?

@fenhl
Copy link
Author

fenhl commented Aug 17, 2019

First, install the nightly with rustup toolchain install nightly-2019-08-15. Then in your crate directory, run rustup override set nightly-2019-08-15. Alternatively, run all cargo commands like e.g. cargo +nightly-2019-08-15 build.

@taiki-e
Copy link
Member

taiki-e commented Aug 19, 2019

Fixed in nightly-2019-08-19.

@Nemo157 Nemo157 closed this as completed Aug 20, 2019
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

4 participants