Skip to content

Commit f7317a6

Browse files
committed
Delete superfluous macro branch
1 parent c2a5ff1 commit f7317a6

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@ macro_rules! rustc_attr {
321321
$tpl,
322322
$duplicate,
323323
$encode_cross_crate,
324-
[concat!(
324+
concat!(
325325
"the `#[",
326326
stringify!($attr),
327327
"]` attribute is used for rustc unit tests"
328-
)],
328+
),
329329
)
330330
};
331-
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr,[$($notes:expr),*] $(,)?) => {
331+
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $($notes:expr),* $(,)?) => {
332332
BuiltinAttribute {
333333
name: sym::$attr,
334334
encode_cross_crate: $encode_cross_crate,
@@ -350,16 +350,6 @@ macro_rules! rustc_attr {
350350
},
351351
}
352352
};
353-
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $($note: expr)? $(,)?) => {
354-
rustc_attr!(
355-
$attr,
356-
$typ,
357-
$tpl,
358-
$duplicates,
359-
$encode_cross_crate,
360-
[$($note)?]
361-
)
362-
};
363353
}
364354

365355
macro_rules! experimental {
@@ -650,7 +640,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
650640
),
651641

652642
// Probably temporary component of min_generic_const_args.
653-
// `#[type_const]` const ASSOC: usize;`
643+
// `#[type_const]` const ASSOC: usize;
654644
gated!(
655645
type_const, Normal, template!(Word), ErrorFollowing,
656646
EncodeCrossCrate::Yes, min_generic_const_args, experimental!(type_const),
@@ -954,10 +944,10 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
954944
rustc_attr!(
955945
rustc_nonnull_optimization_guaranteed, Normal, template!(Word), WarnFollowing,
956946
EncodeCrossCrate::Yes,
957-
["the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to document \
947+
"the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to document \
958948
guaranteed niche optimizations in the standard library",
959949
"the compiler does not even check whether the type indeed is being non-null-optimized; \
960-
it is your responsibility to ensure that the attribute is only used on types that are optimized"],
950+
it is your responsibility to ensure that the attribute is only used on types that are optimized",
961951
),
962952

963953
// ==========================================================================

0 commit comments

Comments
 (0)