Skip to content

Commit 4d9fde5

Browse files
committed
builtin_attrs: inline some strings
1 parent 6cab02c commit 4d9fde5

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/libsyntax/feature_gate/builtin_attrs.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use AttributeType::*;
44
use AttributeGate::*;
55

6-
use super::check::{EXPLAIN_ALLOW_INTERNAL_UNSAFE, EXPLAIN_ALLOW_INTERNAL_UNSTABLE};
76
use rustc_feature::{Features, Stability};
87

98
use crate::ast;
@@ -352,9 +351,12 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
352351
),
353352
gated!(
354353
allow_internal_unstable, Normal, template!(Word, List: "feat1, feat2, ..."),
355-
EXPLAIN_ALLOW_INTERNAL_UNSTABLE,
354+
"allow_internal_unstable side-steps feature gating and stability checks",
355+
),
356+
gated!(
357+
allow_internal_unsafe, Normal, template!(Word),
358+
"allow_internal_unsafe side-steps the unsafe_code lint",
356359
),
357-
gated!(allow_internal_unsafe, Normal, template!(Word), EXPLAIN_ALLOW_INTERNAL_UNSAFE),
358360

359361
// ==========================================================================
360362
// Internal attributes: Type system related:

src/libsyntax/feature_gate/check.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ const EXPLAIN_BOX_SYNTAX: &str =
153153
pub const EXPLAIN_STMT_ATTR_SYNTAX: &str =
154154
"attributes on expressions are experimental";
155155

156-
pub const EXPLAIN_ALLOW_INTERNAL_UNSTABLE: &str =
157-
"allow_internal_unstable side-steps feature gating and stability checks";
158-
pub const EXPLAIN_ALLOW_INTERNAL_UNSAFE: &str =
159-
"allow_internal_unsafe side-steps the unsafe_code lint";
160-
161156
pub const EXPLAIN_UNSIZED_TUPLE_COERCION: &str =
162157
"unsized tuple coercion is not stable enough for use and is subject to change";
163158

0 commit comments

Comments
 (0)