builtin_attrs: inline some strings
This commit is contained in:
parent
6cab02cf14
commit
4d9fde59ae
@ -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";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user