Skip to content

'unresolved import' after adding '#![feature(proc_macro)]' #50187

Closed
@CodeSandwich

Description

@CodeSandwich

I've found a strange bug related to proc macros, which I have hard time reproducing. The simplest steps are:

  1. Clone futures_rs (https://github.com/rust-lang-nursery/futures-rs)
  2. Check out version tagged as 0.1.18 (it does not fail on the newest version)
  3. Run cargo check - it passes
  4. Add #![feature(proc_macro)] on the beginning of src/lib.rs
  5. Run cargo check - it fails:
error[E0432]: unresolved import
  --> src/future/mod.rs:34:16
   |
34 | pub use self::{result as done, FutureResult as Done};
   |                ^^^^^^^^^^^^^^

error: aborting due to previous error

I'm sorry for convoluted instructions, I could not reproduce the issue from the scratch or by reducing futures-rs to a failing bare minimum.

The failing code looks really casual, just reexports of a simple function. If anybody could find the root cause, that would probably help a lot.

I'm using rustc 1.27.0-nightly (ac3c2288f 2018-04-18) on Ubuntu 17.10.

Metadata

Metadata

Assignees

Labels

A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions