summary refs log tree commit diff
path: root/src/librustc_driver
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-17 07:43:50 -0800
committerGitHub <noreply@github.com>2016-11-17 07:43:50 -0800
commitc57b8261496d548e0a3cd8468061ddc5a4dcafe2 (patch)
treeaa6b693f0cda3854318d75b7708f593f52b4f645 /src/librustc_driver
parent5bd1e7f59ffe6126db57ea94b90690d1ac39b932 (diff)
parent6cb33a089fc4727bc070899f57aab3be1b215785 (diff)
downloadrust-c57b8261496d548e0a3cd8468061ddc5a4dcafe2.tar.gz
rust-c57b8261496d548e0a3cd8468061ddc5a4dcafe2.zip
Auto merge of #37732 - jseyfried:use_extern_macros, r=nrc
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
Diffstat (limited to 'src/librustc_driver')
-rw-r--r--src/librustc_driver/driver.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs
index 2dd83f70823..5466c8871d4 100644
--- a/src/librustc_driver/driver.rs
+++ b/src/librustc_driver/driver.rs
@@ -755,8 +755,6 @@ pub fn phase_2_configure_and_expand<'a, F>(sess: &Session,
          || ast_validation::check_crate(sess, &krate));
 
     time(sess.time_passes(), "name resolution", || -> CompileResult {
-        resolver.resolve_imports();
-
         // Since import resolution will eventually happen in expansion,
         // don't perform `after_expand` until after import resolution.
         after_expand(&krate)?;