]> git.lizzy.rs Git - rust.git/commitdiff
builtin_attrs: inline some strings
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 30 Nov 2019 01:03:32 +0000 (02:03 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sat, 30 Nov 2019 01:03:32 +0000 (02:03 +0100)
src/libsyntax/feature_gate/builtin_attrs.rs
src/libsyntax/feature_gate/check.rs

index 36916de57fca6172be02d1b443d8e00cb4d3b352..3e08e2af4941fbe9fd9f1380642d4a66af78a9a2 100644 (file)
@@ -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 @@ macro_rules! experimental {
     ),
     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:
index 19e615f40fa9fe8fd4ff0606af46e5e33f00b2ff..e89c1f910d3baab19bb36c627e8980f1a1a2a3a9 100644 (file)
@@ -153,11 +153,6 @@ fn leveled_feature_err<'a, S: Into<MultiSpan>>(
 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";