From 4d9fde59aec621a2ea5c5ce3c1d7de3d2599d9ae Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 30 Nov 2019 02:03:32 +0100 Subject: [PATCH] builtin_attrs: inline some strings --- src/libsyntax/feature_gate/builtin_attrs.rs | 8 +++++--- src/libsyntax/feature_gate/check.rs | 5 ----- 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 @@ 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: 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 @@ fn leveled_feature_err<'a, S: Into>( 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"; -- 2.44.0