From b92697b8fbcba1e249c5e166a2462e1284bdd139 Mon Sep 17 00:00:00 2001
From: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Date: Sun, 28 Jul 2019 14:02:08 +0300
Subject: [PATCH] cleanup: Remove some language features related to built-in
 macros

They are now library features.
---
 .../asm.md                                     |  0
 .../concat-idents.md                           |  0
 .../global-asm.md                              |  0
 .../trace-macros.md                            |  0
 src/libsyntax/feature_gate.rs                  | 18 ------------------
 src/test/ui/feature-gates/feature-gate-asm2.rs |  1 -
 .../ui/feature-gates/feature-gate-asm2.stderr  |  2 +-
 .../feature-gate-concat_idents2.rs             |  2 --
 .../feature-gate-concat_idents2.stderr         |  4 ++--
 .../feature-gate-concat_idents3.rs             |  2 --
 .../feature-gate-concat_idents3.stderr         |  4 ++--
 .../feature-gates/feature-gate-log_syntax2.rs  |  2 --
 .../feature-gate-log_syntax2.stderr            |  2 +-
 13 files changed, 6 insertions(+), 31 deletions(-)
 rename src/doc/unstable-book/src/{language-features => library-features}/asm.md (100%)
 rename src/doc/unstable-book/src/{language-features => library-features}/concat-idents.md (100%)
 rename src/doc/unstable-book/src/{language-features => library-features}/global-asm.md (100%)
 rename src/doc/unstable-book/src/{language-features => library-features}/trace-macros.md (100%)

diff --git a/src/doc/unstable-book/src/language-features/asm.md b/src/doc/unstable-book/src/library-features/asm.md
similarity index 100%
rename from src/doc/unstable-book/src/language-features/asm.md
rename to src/doc/unstable-book/src/library-features/asm.md
diff --git a/src/doc/unstable-book/src/language-features/concat-idents.md b/src/doc/unstable-book/src/library-features/concat-idents.md
similarity index 100%
rename from src/doc/unstable-book/src/language-features/concat-idents.md
rename to src/doc/unstable-book/src/library-features/concat-idents.md
diff --git a/src/doc/unstable-book/src/language-features/global-asm.md b/src/doc/unstable-book/src/library-features/global-asm.md
similarity index 100%
rename from src/doc/unstable-book/src/language-features/global-asm.md
rename to src/doc/unstable-book/src/library-features/global-asm.md
diff --git a/src/doc/unstable-book/src/language-features/trace-macros.md b/src/doc/unstable-book/src/library-features/trace-macros.md
similarity index 100%
rename from src/doc/unstable-book/src/language-features/trace-macros.md
rename to src/doc/unstable-book/src/library-features/trace-macros.md
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 72184b0bd6400..0da6300ab95d5 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -243,9 +243,6 @@ declare_features! (
     // Allows using `#![needs_allocator]`, an implementation detail of `#[global_allocator]`.
     (active, allocator_internals, "1.20.0", None, None),
 
-    // Allows using the `format_args_nl` macro.
-    (active, format_args_nl, "1.29.0", Some(0), None),
-
     // no-tracking-issue-end
 
     // Added for testing E0705; perma-unstable.
@@ -286,12 +283,6 @@ declare_features! (
     // feature-group-start: actual feature gates
     // -------------------------------------------------------------------------
 
-    // Allows using `asm!` macro with which inline assembly can be embedded.
-    (active, asm, "1.0.0", Some(29722), None),
-
-    // Allows using the `concat_idents!` macro with which identifiers can be concatenated.
-    (active, concat_idents, "1.0.0", Some(29599), None),
-
     // Allows using the `#[link_args]` attribute.
     (active, link_args, "1.0.0", Some(29596), None),
 
@@ -307,12 +298,6 @@ declare_features! (
     // Allows using `#[thread_local]` on `static` items.
     (active, thread_local, "1.0.0", Some(29594), None),
 
-    // Allows using the `log_syntax!` macro.
-    (active, log_syntax, "1.0.0", Some(29598), None),
-
-    // Allows using the `trace_macros!` macro.
-    (active, trace_macros, "1.0.0", Some(29598), None),
-
     // Allows the use of SIMD types in functions declared in `extern` blocks.
     (active, simd_ffi, "1.0.0", Some(27731), None),
 
@@ -402,9 +387,6 @@ declare_features! (
     // Allows `extern "x86-interrupt" fn()`.
     (active, abi_x86_interrupt, "1.17.0", Some(40180), None),
 
-    // Allows module-level inline assembly by way of `global_asm!()`.
-    (active, global_asm, "1.18.0", Some(35119), None),
-
     // Allows overlapping impls of marker traits.
     (active, overlapping_marker_traits, "1.18.0", Some(29864), None),
 
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.rs b/src/test/ui/feature-gates/feature-gate-asm2.rs
index 82900eb7e6c47..4f56aa7234464 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm2.rs
@@ -1,4 +1,3 @@
-// gate-test-asm
 // ignore-emscripten
 
 fn main() {
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.stderr b/src/test/ui/feature-gates/feature-gate-asm2.stderr
index e985818f30e5f..7519cad9a96ad 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm2.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-asm2.rs:6:26
+  --> $DIR/feature-gate-asm2.rs:5:26
    |
 LL |         println!("{:?}", asm!(""));
    |                          ^^^
diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents2.rs b/src/test/ui/feature-gates/feature-gate-concat_idents2.rs
index 0cc6c577e8d5e..9660ffeafa518 100644
--- a/src/test/ui/feature-gates/feature-gate-concat_idents2.rs
+++ b/src/test/ui/feature-gates/feature-gate-concat_idents2.rs
@@ -1,5 +1,3 @@
-// gate-test-concat_idents
-
 fn main() {
     concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough
                           //~| ERROR cannot find value `ab` in this scope
diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr
index 4ae5e3e73087b..14519622c05ad 100644
--- a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents2.rs:4:5
+  --> $DIR/feature-gate-concat_idents2.rs:2:5
    |
 LL |     concat_idents!(a, b);
    |     ^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL |     concat_idents!(a, b);
    = help: add `#![feature(concat_idents)]` to the crate attributes to enable
 
 error[E0425]: cannot find value `ab` in this scope
-  --> $DIR/feature-gate-concat_idents2.rs:4:5
+  --> $DIR/feature-gate-concat_idents2.rs:2:5
    |
 LL |     concat_idents!(a, b);
    |     ^^^^^^^^^^^^^^^^^^^^^ not found in this scope
diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents3.rs b/src/test/ui/feature-gates/feature-gate-concat_idents3.rs
index 2882e7a800836..81710fd9fb041 100644
--- a/src/test/ui/feature-gates/feature-gate-concat_idents3.rs
+++ b/src/test/ui/feature-gates/feature-gate-concat_idents3.rs
@@ -1,5 +1,3 @@
-// gate-test-concat_idents
-
 const XY_1: i32 = 10;
 
 fn main() {
diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr
index 367638693d70a..afe6acb253594 100644
--- a/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr
+++ b/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents3.rs:7:20
+  --> $DIR/feature-gate-concat_idents3.rs:5:20
    |
 LL |     assert_eq!(10, concat_idents!(X, Y_1));
    |                    ^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL |     assert_eq!(10, concat_idents!(X, Y_1));
    = help: add `#![feature(concat_idents)]` to the crate attributes to enable
 
 error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents3.rs:8:20
+  --> $DIR/feature-gate-concat_idents3.rs:6:20
    |
 LL |     assert_eq!(20, concat_idents!(X, Y_2));
    |                    ^^^^^^^^^^^^^
diff --git a/src/test/ui/feature-gates/feature-gate-log_syntax2.rs b/src/test/ui/feature-gates/feature-gate-log_syntax2.rs
index a3906dcc16e1c..db1a96f1f23ea 100644
--- a/src/test/ui/feature-gates/feature-gate-log_syntax2.rs
+++ b/src/test/ui/feature-gates/feature-gate-log_syntax2.rs
@@ -1,5 +1,3 @@
-// gate-test-log_syntax
-
 fn main() {
     println!("{:?}", log_syntax!()); //~ ERROR `log_syntax!` is not stable
 }
diff --git a/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr
index 0443b988b41dc..81daee0b49f34 100644
--- a/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature 'log_syntax': `log_syntax!` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-log_syntax2.rs:4:22
+  --> $DIR/feature-gate-log_syntax2.rs:2:22
    |
 LL |     println!("{:?}", log_syntax!());
    |                      ^^^^^^^^^^