about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-08-04 03:37:14 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-08-06 23:22:31 +0300
commitcb64672e0cfccb6d447fddd0ca3e74d0f1de542f (patch)
tree2b83af8fab8487985672bbdeaeefa6719c1e8e0a
parentf60d96a4773db747aef75014ef6b41b39ae92372 (diff)
downloadrust-cb64672e0cfccb6d447fddd0ca3e74d0f1de542f.tar.gz
rust-cb64672e0cfccb6d447fddd0ca3e74d0f1de542f.zip
Enable macro modularization implicitly if one of "advanced" macro features is enabled
Do not mark all builtin attributes as used when macro modularization is enabled
-rw-r--r--src/libsyntax/feature_gate.rs12
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/issue-50493.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/lints_in_proc_macros.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs2
-rw-r--r--src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates2.rs2
-rw-r--r--src/test/compile-fail/macro-with-seps-err-msg.rs4
-rw-r--r--src/test/compile-fail/unknown-tool-name.rs2
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs2
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/hello_macro.rs2
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs2
-rw-r--r--src/test/run-pass-fulldeps/macro-quote-cond.rs2
-rw-r--r--src/test/run-pass-fulldeps/macro-quote-test.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/bang-macro.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/call-site.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/count_compound_ops.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-b.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs2
-rw-r--r--src/test/run-pass-fulldeps/proc_macro.rs2
-rw-r--r--src/test/ui-fulldeps/auxiliary/attr_proc_macro.rs2
-rw-r--r--src/test/ui-fulldeps/auxiliary/bang_proc_macro.rs2
-rw-r--r--src/test/ui-fulldeps/auxiliary/lifetimes.rs1
-rw-r--r--src/test/ui-fulldeps/lifetimes.rs2
-rw-r--r--src/test/ui-fulldeps/proc-macro/auxiliary/generate-mod.rs1
-rw-r--r--src/test/ui-fulldeps/proc-macro/generate-mod.rs2
-rw-r--r--src/test/ui-fulldeps/proc-macro/invalid-attributes.rs1
-rw-r--r--src/test/ui-fulldeps/proc-macro/invalid-attributes.stderr12
-rw-r--r--src/test/ui-fulldeps/proc-macro/macro-namespace-reserved.rs2
-rw-r--r--src/test/ui-fulldeps/proc-macro/non-root.rs1
-rw-r--r--src/test/ui-fulldeps/proc-macro/non-root.stderr2
-rw-r--r--src/test/ui-fulldeps/proc-macro/three-equals.rs2
-rw-r--r--src/test/ui/imports/macros.rs2
38 files changed, 44 insertions, 50 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 3f4ee834256..a7a29edf0a0 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -83,10 +83,14 @@ macro_rules! declare_features {
             }
 
             pub fn use_extern_macros(&self) -> bool {
-                // The `decl_macro`, `tool_attributes` and `custom_attributes`
-                // features imply `use_extern_macros`.
+                // A number of "advanced" macro features enable
+                // macro modularization (`use_extern_macros`) implicitly.
                 self.use_extern_macros || self.decl_macro ||
-                self.tool_attributes || self.custom_attribute
+                self.tool_attributes || self.custom_attribute ||
+                self.macros_in_extern || self.proc_macro_path_invoc ||
+                self.proc_macro_mod || self.proc_macro_expr ||
+                self.proc_macro_non_items || self.proc_macro_gen ||
+                self.stmt_expr_attributes
             }
         }
     };
@@ -700,7 +704,7 @@ pub fn is_builtin_attr_name(name: ast::Name) -> bool {
 }
 
 pub fn is_builtin_attr(attr: &ast::Attribute) -> bool {
-    BUILTIN_ATTRIBUTES.iter().any(|&(builtin_name, _, _)| attr.check_name(builtin_name)) ||
+    BUILTIN_ATTRIBUTES.iter().any(|&(builtin_name, _, _)| attr.path == builtin_name) ||
     attr.name().as_str().starts_with("rustc_")
 }
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs b/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs
index 64af21dbe10..91b72510e3e 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attr-invalid-exprs.rs
@@ -13,7 +13,7 @@
 
 //! Attributes producing expressions in invalid locations
 
-#![feature(use_extern_macros, stmt_expr_attributes, proc_macro_expr)]
+#![feature(stmt_expr_attributes, proc_macro_expr)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{duplicate, no_output};
diff --git a/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs b/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs
index 05b5c918ef0..52b2a473ecd 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/attr-stmt-expr.rs
@@ -11,7 +11,7 @@
 // aux-build:attr-stmt-expr.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_expr)]
+#![feature(proc_macro_expr)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{expect_let, expect_print_stmt, expect_expr, expect_print_expr};
diff --git a/src/test/compile-fail-fulldeps/proc-macro/issue-50493.rs b/src/test/compile-fail-fulldeps/proc-macro/issue-50493.rs
index 51112f202c8..eaa64c6ba36 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/issue-50493.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/issue-50493.rs
@@ -11,8 +11,6 @@
 // aux-build:issue_50493.rs
 // ignore-stage1
 
-#![feature(proc_macro)]
-
 #[macro_use]
 extern crate issue_50493;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/lints_in_proc_macros.rs b/src/test/compile-fail-fulldeps/proc-macro/lints_in_proc_macros.rs
index 6473b69b459..6e9d231ea99 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/lints_in_proc_macros.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/lints_in_proc_macros.rs
@@ -11,7 +11,7 @@
 // aux-build:bang_proc_macro2.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 #![allow(unused_macros)]
 
 extern crate bang_proc_macro2;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs
index 9ed665b6e68..8640aa2387f 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-custom-attr-mutex.rs
@@ -11,7 +11,7 @@
 // aux-build:attr_proc_macro.rs
 // ignore-tidy-linelength
 
-#![feature(use_extern_macros, custom_attribute)]
+#![feature(custom_attribute)]
 //~^ ERROR Cannot use `#![feature(use_extern_macros)]` and `#![feature(custom_attribute)] at the same time
 
 extern crate attr_proc_macro;
diff --git a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs
index 51b1bfca294..9a0171c2ae5 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates.rs
@@ -16,7 +16,7 @@
 // gate-test-proc_macro_mod
 // gate-test-proc_macro_gen
 
-#![feature(use_extern_macros, stmt_expr_attributes)]
+#![feature(stmt_expr_attributes)]
 
 extern crate proc_macro_gates as foo;
 
diff --git a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates2.rs b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates2.rs
index ef6d4557f4c..dc182414a1d 100644
--- a/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates2.rs
+++ b/src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates2.rs
@@ -10,7 +10,7 @@
 
 // aux-build:proc-macro-gates.rs
 
-#![feature(use_extern_macros, stmt_expr_attributes)]
+#![feature(stmt_expr_attributes)]
 
 extern crate proc_macro_gates as foo;
 
diff --git a/src/test/compile-fail/macro-with-seps-err-msg.rs b/src/test/compile-fail/macro-with-seps-err-msg.rs
index 6567a100d8c..1281adce5c5 100644
--- a/src/test/compile-fail/macro-with-seps-err-msg.rs
+++ b/src/test/compile-fail/macro-with-seps-err-msg.rs
@@ -10,10 +10,6 @@
 
 // gate-test-use_extern_macros
 
-#![feature(proc_macro_path_invoc)]
-
 fn main() {
     globnar::brotz!(); //~ ERROR non-ident macro paths are experimental
-    #[derive(foo::Bar)] struct T; //~ ERROR non-ident macro paths are experimental
-    ::foo!(); //~ ERROR non-ident macro paths are experimental
 }
diff --git a/src/test/compile-fail/unknown-tool-name.rs b/src/test/compile-fail/unknown-tool-name.rs
index c4d22e6d392..99c336c28cd 100644
--- a/src/test/compile-fail/unknown-tool-name.rs
+++ b/src/test/compile-fail/unknown-tool-name.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(use_extern_macros, proc_macro_path_invoc)]
+#![feature(proc_macro_path_invoc)]
 
 #[foo::bar] //~ ERROR failed to resolve. Use of undeclared type or module `foo`
 fn main() {}
diff --git a/src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs b/src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs
index ec6f54fb137..94c5b208a37 100644
--- a/src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs
@@ -11,7 +11,7 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs b/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
index 545eabe00ff..b54543c73fb 100644
--- a/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
@@ -11,7 +11,7 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(use_extern_macros, proc_macro_non_items, proc_macro_quote)]
+#![feature(proc_macro_non_items, proc_macro_quote)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs b/src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs
index 9a5bffb92a4..9faa7366ec5 100644
--- a/src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs
@@ -11,7 +11,7 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate proc_macro;
 
diff --git a/src/test/run-pass-fulldeps/macro-quote-cond.rs b/src/test/run-pass-fulldeps/macro-quote-cond.rs
index f1dcec8af69..3eb7e8cc9a4 100644
--- a/src/test/run-pass-fulldeps/macro-quote-cond.rs
+++ b/src/test/run-pass-fulldeps/macro-quote-cond.rs
@@ -11,7 +11,7 @@
 // aux-build:cond_plugin.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate cond_plugin;
 
diff --git a/src/test/run-pass-fulldeps/macro-quote-test.rs b/src/test/run-pass-fulldeps/macro-quote-test.rs
index 2349fa68c65..1005a6bfc50 100644
--- a/src/test/run-pass-fulldeps/macro-quote-test.rs
+++ b/src/test/run-pass-fulldeps/macro-quote-test.rs
@@ -13,7 +13,7 @@
 // aux-build:hello_macro.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items, proc_macro_gen)]
+#![feature(proc_macro_non_items, proc_macro_gen)]
 
 extern crate hello_macro;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs b/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs
index 3356828c04b..b5272e6608b 100644
--- a/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/attr-stmt-expr.rs
@@ -11,7 +11,7 @@
 // aux-build:attr-stmt-expr.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, stmt_expr_attributes, proc_macro_expr)]
+#![feature(stmt_expr_attributes, proc_macro_expr)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{expect_let, expect_print_stmt, expect_expr, expect_print_expr,
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
index c6bcc37ac4a..a84e029f9d8 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
@@ -10,7 +10,7 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro_non_items, proc_macro_quote, use_extern_macros)]
+#![feature(proc_macro_non_items, proc_macro_quote)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
index 8f95bdd9c39..43c1d5fcc8d 100644
--- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
@@ -10,7 +10,7 @@
 
 // no-prefer-dynamic
 
-#![feature(use_extern_macros, proc_macro_quote, proc_macro_non_items)]
+#![feature(proc_macro_quote, proc_macro_non_items)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro as proc_macro_renamed; // This does not break `quote!`
diff --git a/src/test/run-pass-fulldeps/proc-macro/bang-macro.rs b/src/test/run-pass-fulldeps/proc-macro/bang-macro.rs
index f9d17a9decb..955b6ab986d 100644
--- a/src/test/run-pass-fulldeps/proc-macro/bang-macro.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/bang-macro.rs
@@ -11,7 +11,7 @@
 // aux-build:bang-macro.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate bang_macro;
 use bang_macro::rewrite;
diff --git a/src/test/run-pass-fulldeps/proc-macro/call-site.rs b/src/test/run-pass-fulldeps/proc-macro/call-site.rs
index 505994f66e7..dfe97eb587c 100644
--- a/src/test/run-pass-fulldeps/proc-macro/call-site.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/call-site.rs
@@ -11,7 +11,7 @@
 // aux-build:call-site.rs
 // ignore-stage1
 
-#![feature(proc_macro_non_items, use_extern_macros)]
+#![feature(proc_macro_non_items)]
 
 extern crate call_site;
 use call_site::*;
diff --git a/src/test/run-pass-fulldeps/proc-macro/count_compound_ops.rs b/src/test/run-pass-fulldeps/proc-macro/count_compound_ops.rs
index f4a51d0624a..6601d66e586 100644
--- a/src/test/run-pass-fulldeps/proc-macro/count_compound_ops.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/count_compound_ops.rs
@@ -11,7 +11,7 @@
 // aux-build:count_compound_ops.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate count_compound_ops;
 use count_compound_ops::count_compound_ops;
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-b.rs b/src/test/run-pass-fulldeps/proc-macro/derive-b.rs
index 35d5084d9f6..4a7c8f3e834 100644
--- a/src/test/run-pass-fulldeps/proc-macro/derive-b.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-b.rs
@@ -11,7 +11,7 @@
 // aux-build:derive-b.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_path_invoc)]
+#![feature(proc_macro_path_invoc)]
 
 extern crate derive_b;
 
diff --git a/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs b/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
index 5ee164415a1..579e8c33773 100644
--- a/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
@@ -12,7 +12,7 @@
 // aux-build:hygiene_example.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate hygiene_example;
 use hygiene_example::hello;
diff --git a/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs b/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs
index e5f8c844b6b..bd76cc38054 100644
--- a/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs
+++ b/src/test/run-pass-fulldeps/proc-macro/macros-in-extern.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // ignore-wasm32
 
-#![feature(use_extern_macros, macros_in_extern)]
+#![feature(macros_in_extern)]
 
 extern crate test_macros;
 
diff --git a/src/test/run-pass-fulldeps/proc_macro.rs b/src/test/run-pass-fulldeps/proc_macro.rs
index 46b62d7e34a..c9d7b0423ec 100644
--- a/src/test/run-pass-fulldeps/proc_macro.rs
+++ b/src/test/run-pass-fulldeps/proc_macro.rs
@@ -12,7 +12,7 @@
 // ignore-stage1
 // ignore-cross-compile
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate proc_macro_def;
 
diff --git a/src/test/ui-fulldeps/auxiliary/attr_proc_macro.rs b/src/test/ui-fulldeps/auxiliary/attr_proc_macro.rs
index db0c19e96f8..679cb772868 100644
--- a/src/test/ui-fulldeps/auxiliary/attr_proc_macro.rs
+++ b/src/test/ui-fulldeps/auxiliary/attr_proc_macro.rs
@@ -10,7 +10,7 @@
 
 // force-host
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/auxiliary/bang_proc_macro.rs b/src/test/ui-fulldeps/auxiliary/bang_proc_macro.rs
index 89ac11b309d..6484725814a 100644
--- a/src/test/ui-fulldeps/auxiliary/bang_proc_macro.rs
+++ b/src/test/ui-fulldeps/auxiliary/bang_proc_macro.rs
@@ -10,7 +10,7 @@
 
 // force-host
 // no-prefer-dynamic
-#![feature(proc_macro)]
+
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/auxiliary/lifetimes.rs b/src/test/ui-fulldeps/auxiliary/lifetimes.rs
index ecf0a56edf7..fc59a622bfa 100644
--- a/src/test/ui-fulldeps/auxiliary/lifetimes.rs
+++ b/src/test/ui-fulldeps/auxiliary/lifetimes.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/lifetimes.rs b/src/test/ui-fulldeps/lifetimes.rs
index 3200e8fb2b1..6879848d269 100644
--- a/src/test/ui-fulldeps/lifetimes.rs
+++ b/src/test/ui-fulldeps/lifetimes.rs
@@ -10,7 +10,7 @@
 
 // aux-build:lifetimes.rs
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate lifetimes;
 
diff --git a/src/test/ui-fulldeps/proc-macro/auxiliary/generate-mod.rs b/src/test/ui-fulldeps/proc-macro/auxiliary/generate-mod.rs
index 632dba42ad0..1ed8ef52027 100644
--- a/src/test/ui-fulldeps/proc-macro/auxiliary/generate-mod.rs
+++ b/src/test/ui-fulldeps/proc-macro/auxiliary/generate-mod.rs
@@ -11,7 +11,6 @@
 // run-pass
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/proc-macro/generate-mod.rs b/src/test/ui-fulldeps/proc-macro/generate-mod.rs
index ee0077c3ed3..b0cccd8728b 100644
--- a/src/test/ui-fulldeps/proc-macro/generate-mod.rs
+++ b/src/test/ui-fulldeps/proc-macro/generate-mod.rs
@@ -12,7 +12,7 @@
 
 // aux-build:generate-mod.rs
 
-#![feature(use_extern_macros, proc_macro_gen, proc_macro_path_invoc)]
+#![feature(proc_macro_gen, proc_macro_path_invoc)]
 
 extern crate generate_mod;
 
diff --git a/src/test/ui-fulldeps/proc-macro/invalid-attributes.rs b/src/test/ui-fulldeps/proc-macro/invalid-attributes.rs
index c06f98ed5ff..8b940a0f405 100644
--- a/src/test/ui-fulldeps/proc-macro/invalid-attributes.rs
+++ b/src/test/ui-fulldeps/proc-macro/invalid-attributes.rs
@@ -11,7 +11,6 @@
 // no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
-#![feature(proc_macro)]
 
 extern crate proc_macro;
 
diff --git a/src/test/ui-fulldeps/proc-macro/invalid-attributes.stderr b/src/test/ui-fulldeps/proc-macro/invalid-attributes.stderr
index c480bcb5df9..5fd87362db2 100644
--- a/src/test/ui-fulldeps/proc-macro/invalid-attributes.stderr
+++ b/src/test/ui-fulldeps/proc-macro/invalid-attributes.stderr
@@ -1,35 +1,35 @@
 error: `#[proc_macro]` attribute does not take any arguments
-  --> $DIR/invalid-attributes.rs:20:1
+  --> $DIR/invalid-attributes.rs:19:1
    |
 LL | #[proc_macro = "test"] //~ ERROR: does not take any arguments
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 error: `#[proc_macro]` attribute does not take any arguments
-  --> $DIR/invalid-attributes.rs:23:1
+  --> $DIR/invalid-attributes.rs:22:1
    |
 LL | #[proc_macro()] //~ ERROR: does not take any arguments
    | ^^^^^^^^^^^^^^^
 
 error: `#[proc_macro]` attribute does not take any arguments
-  --> $DIR/invalid-attributes.rs:26:1
+  --> $DIR/invalid-attributes.rs:25:1
    |
 LL | #[proc_macro(x)] //~ ERROR: does not take any arguments
    | ^^^^^^^^^^^^^^^^
 
 error: `#[proc_macro_attribute]` attribute does not take any arguments
-  --> $DIR/invalid-attributes.rs:29:1
+  --> $DIR/invalid-attributes.rs:28:1
    |
 LL | #[proc_macro_attribute = "test"] //~ ERROR: does not take any arguments
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `#[proc_macro_attribute]` attribute does not take any arguments
-  --> $DIR/invalid-attributes.rs:32:1
+  --> $DIR/invalid-attributes.rs:31:1
    |
 LL | #[proc_macro_attribute()] //~ ERROR: does not take any arguments
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `#[proc_macro_attribute]` attribute does not take any arguments
-  --> $DIR/invalid-attributes.rs:35:1
+  --> $DIR/invalid-attributes.rs:34:1
    |
 LL | #[proc_macro_attribute(x)] //~ ERROR: does not take any arguments
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved.rs b/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved.rs
index 21d625ae09d..e7bb05de88c 100644
--- a/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved.rs
+++ b/src/test/ui-fulldeps/proc-macro/macro-namespace-reserved.rs
@@ -10,7 +10,7 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro, decl_macro)]
+#![feature(decl_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/proc-macro/non-root.rs b/src/test/ui-fulldeps/proc-macro/non-root.rs
index 288c63b4c77..24404885788 100644
--- a/src/test/ui-fulldeps/proc-macro/non-root.rs
+++ b/src/test/ui-fulldeps/proc-macro/non-root.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(proc_macro)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui-fulldeps/proc-macro/non-root.stderr b/src/test/ui-fulldeps/proc-macro/non-root.stderr
index 8c14f644d7a..23222a2b851 100644
--- a/src/test/ui-fulldeps/proc-macro/non-root.stderr
+++ b/src/test/ui-fulldeps/proc-macro/non-root.stderr
@@ -1,5 +1,5 @@
 error: functions tagged with `#[proc_macro]` must currently reside in the root of the crate
-  --> $DIR/non-root.rs:21:5
+  --> $DIR/non-root.rs:20:5
    |
 LL |     pub fn foo(arg: TokenStream) -> TokenStream { arg }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui-fulldeps/proc-macro/three-equals.rs b/src/test/ui-fulldeps/proc-macro/three-equals.rs
index ee5f3b33a06..f6b0e90da00 100644
--- a/src/test/ui-fulldeps/proc-macro/three-equals.rs
+++ b/src/test/ui-fulldeps/proc-macro/three-equals.rs
@@ -11,7 +11,7 @@
 // aux-build:three-equals.rs
 // ignore-stage1
 
-#![feature(use_extern_macros, proc_macro_non_items)]
+#![feature(proc_macro_non_items)]
 
 extern crate three_equals;
 
diff --git a/src/test/ui/imports/macros.rs b/src/test/ui/imports/macros.rs
index 5d6a1191384..ed5907800e9 100644
--- a/src/test/ui/imports/macros.rs
+++ b/src/test/ui/imports/macros.rs
@@ -10,7 +10,7 @@
 
 // aux-build:two_macros.rs
 
-#![feature(item_like_imports, use_extern_macros)]
+#![feature(use_extern_macros)]
 
 extern crate two_macros; // two identity macros `m` and `n`