-
Couldn't load subscription status.
- Fork 13.9k
Description
Currently, if the some name is imported by macro_use for the second time it overwrites the previous import with the same name, so the last name "wins".
(At least when the second macro_use comes from a macro such overwriting is reported as an error.)
Also there's no distinction between explicit macro_use(name) with arguments and "glob" macro_use without arguments, and a "glob" can overwrite an explicit import.
Typically, name resolution in rust doesn't behave this way.
Typically it is order-independent, explicit names shadow glob names, and glob ambiguities are reported as errors on use.
In practice, we should be able to adjust the rules for #[macro_use] extern crates to follow the usual name resolution practices without much breakage.
This is an issue to link from rust-lang/reference#2057.