about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-30 02:03:32 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-11-30 02:03:32 +0100
commit4d9fde59aec621a2ea5c5ce3c1d7de3d2599d9ae (patch)
tree8efca93d2136eb390409b817badf68e5e46abd7c /src/libsyntax
parent6cab02cf149787db6c9e30ee0ceed97768bbe9aa (diff)
downloadrust-4d9fde59aec621a2ea5c5ce3c1d7de3d2599d9ae.tar.gz
rust-4d9fde59aec621a2ea5c5ce3c1d7de3d2599d9ae.zip
builtin_attrs: inline some strings
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate/builtin_attrs.rs8
-rw-r--r--src/libsyntax/feature_gate/check.rs5
2 files changed, 5 insertions, 8 deletions
diff --git a/src/libsyntax/feature_gate/builtin_attrs.rs b/src/libsyntax/feature_gate/builtin_attrs.rs
index 36916de57fc..3e08e2af494 100644
--- a/src/libsyntax/feature_gate/builtin_attrs.rs
+++ b/src/libsyntax/feature_gate/builtin_attrs.rs
@@ -3,7 +3,6 @@
 use AttributeType::*;
 use AttributeGate::*;
 
-use super::check::{EXPLAIN_ALLOW_INTERNAL_UNSAFE, EXPLAIN_ALLOW_INTERNAL_UNSTABLE};
 use rustc_feature::{Features, Stability};
 
 use crate::ast;
@@ -352,9 +351,12 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
     ),
     gated!(
         allow_internal_unstable, Normal, template!(Word, List: "feat1, feat2, ..."),
-        EXPLAIN_ALLOW_INTERNAL_UNSTABLE,
+        "allow_internal_unstable side-steps feature gating and stability checks",
+    ),
+    gated!(
+        allow_internal_unsafe, Normal, template!(Word),
+        "allow_internal_unsafe side-steps the unsafe_code lint",
     ),
-    gated!(allow_internal_unsafe, Normal, template!(Word), EXPLAIN_ALLOW_INTERNAL_UNSAFE),
 
     // ==========================================================================
     // Internal attributes: Type system related:
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs
index 19e615f40fa..e89c1f910d3 100644
--- a/src/libsyntax/feature_gate/check.rs
+++ b/src/libsyntax/feature_gate/check.rs
@@ -153,11 +153,6 @@ const EXPLAIN_BOX_SYNTAX: &str =
 pub const EXPLAIN_STMT_ATTR_SYNTAX: &str =
     "attributes on expressions are experimental";
 
-pub const EXPLAIN_ALLOW_INTERNAL_UNSTABLE: &str =
-    "allow_internal_unstable side-steps feature gating and stability checks";
-pub const EXPLAIN_ALLOW_INTERNAL_UNSAFE: &str =
-    "allow_internal_unsafe side-steps the unsafe_code lint";
-
 pub const EXPLAIN_UNSIZED_TUPLE_COERCION: &str =
     "unsized tuple coercion is not stable enough for use and is subject to change";