Skip to content

Import resolution regression when test has the same name as extern macro #53144

Closed
@dtolnay

Description

@dtolnay

I am seeing some breakage in indoc from #52890. It minimizes to:

#![feature(use_extern_macros)]

#[test]
fn unimplemented() {}

fn main() {
    unimplemented!();
}
$ cargo +nightly-2018-08-02 test
   Compiling repro v0.0.0
    Finished dev [unoptimized + debuginfo] target(s) in 0.56s
     Running target/debug/deps/repro-1d729be478cd3ccf

running 1 test
test unimplemented ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
$ cargo +nightly-2018-08-03 test
   Compiling repro v0.0.0
error: cannot determine resolution for the macro `unimplemented`
 --> src/main.rs:7:5
  |
7 |     unimplemented!();
  |     ^^^^^^^^^^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error: aborting due to previous error

error: Could not compile `repro`.

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

@djrenren @petrochenkov

Metadata

Metadata

Assignees

Labels

A-decl-macros-1-2Area: Declarative macros 1.2A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyP-highHigh priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions