Closed
Description
Repro case (1.19.0-beta.1 as well as nightly):
macro_rules! y {
() => {}
}
mod m {
pub const A: i32 = 0;
}
fn main() {
y!();
let _ = A;
}
When running it in nightly, it produces a weird error message:
error[E0425]: cannot find value `A` in this scope
--> 1.rs:9:13
|
9 | let _ = A;
| ^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
| fn main() use m::A;
error: aborting due to previous error(s)
No repro on 1.18 or before
error[E0425]: cannot find value `A` in this scope
--> <source>:9:13
|
9 | let _ = A;
| ^ not found in this scope
|
= help: possible candidate is found in another module, you can import it into scope:
`use m::A;`
error: aborting due to previous error
Version
rustc 1.19.0-nightly (f062832b2 2017-06-07)
binary: rustc
commit-hash: f062832b208e94f2f0f26ed7fb5c48c172069fbe
commit-date: 2017-06-07
host: x86_64-apple-darwin
release: 1.19.0-nightly
LLVM version: 4.0