use AttributeType::*;
use AttributeGate::*;
-use super::check::{EXPLAIN_ALLOW_INTERNAL_UNSAFE, EXPLAIN_ALLOW_INTERNAL_UNSTABLE};
use rustc_feature::{Features, Stability};
use crate::ast;
),
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:
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";