Skip to content
Permalink
Browse files

builtin_attrs: inline some strings

  • Loading branch information
Centril committed Nov 30, 2019
1 parent 6cab02c commit 4d9fde59aec621a2ea5c5ce3c1d7de3d2599d9ae
Showing with 5 additions and 8 deletions.
  1. +5 −3 src/libsyntax/feature_gate/builtin_attrs.rs
  2. +0 −5 src/libsyntax/feature_gate/check.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:
@@ -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";

0 comments on commit 4d9fde5

Please sign in to comment.
You can’t perform that action at this time.