Description
Hello
I have this code: https://gitlab.labs.nic.cz/turris/pakon-aggregator (unfortunately, I don't have a minimal code example yet). It fails with rustc 1.20.0-nightly (067971139 2017-07-02)
(for some reason this is the version I get if I run rustup default nightly-2017-07-03
, it seems to be one day off) and newer, but passes with older versions of nighly as well as stable and beta.
The error I get is:
error: unexpected end of macro invocation
--> src/keeper/column.rs:269:1
|
269 | / column! {
270 | | /// Identifier of an address inside an endpoint.
271 | | ///
272 | | /// This is usually used to specify aggregation by a value in queries.
... |
357 | | name Port u16;
358 | | }
| |_^ in this macro invocation
|
= note: this error originates in a macro outside of the current crate
This is actually my own macro, so the „originates in a macro outside of the current crate“ part is wrong. Also, renaming the macro makes it compile again. This leads me to think something (the compiler) brought in a colliding macro with the same name.
Is my theory about the colliding macro true? Can this killing of my poor innocent macro be prevented somehow? Should local macros have precedence? Or, at least, should I get a better error message, like complaining when I define the macro, not when I use it? This makes me think that if I had the bad luck of having a same-name macro with the same invocation syntax, it would silently expand the wrong one.
Exact version
$ rustc --version --verbose
rustc 1.20.0-nightly (067971139 2017-07-02)
binary: rustc
commit-hash: 0679711398bef656699e1ff6b004ecccbdb67284
commit-date: 2017-07-02
host: x86_64-unknown-linux-gnu
release: 1.20.0-nightly
LLVM version: 4.0