]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #37732 - jseyfried:use_extern_macros, r=nrc
authorbors <bors@rust-lang.org>
Thu, 17 Nov 2016 15:43:50 +0000 (07:43 -0800)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2016 15:43:50 +0000 (07:43 -0800)
Support `use`ing externally defined macros behind `#![feature(use_extern_macros)]`

With `#![feature(use_extern_macros)]`,
 - A name collision between macros from different upstream crates is much less of an issue since we can `use` the macros in different submodules or rename with `as`.
 - We can reexport macros with `pub use`, so `#![feature(macro_reexport)]` is no longer needed.
 - These reexports are allowed in any module, so crates can expose a macro-modular interface.

If a macro invocation can resolve to both a `use` import and a `macro_rules!` or `#[macro_use]`, it is an ambiguity error.

r? @nrc


Trivial merge