Skip to content

Commit e82f077

Browse files
committed
NFC: Simplify prefixed_item! macro.
Since `extended_key_value_attributes` was stablized prior to 1.61, we can simplify this macro.
1 parent 88078f2 commit e82f077

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/prefixed.rs

+1-17
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,12 @@ macro_rules! prefixed_export {
6565
}
6666

6767
macro_rules! prefixed_item {
68-
// Calculate the prefixed name in a separate layer of macro expansion
69-
// because rustc won't currently accept a non-literal expression as
70-
// the value for `#[link_name = value]`.
7168
{
7269
$attr:ident
7370
$name:ident
7471
{ $item:item }
7572
} => {
76-
prefixed_item! {
77-
$attr
78-
{ concat!(env!("RING_CORE_PREFIX"), stringify!($name)) }
79-
{ $item }
80-
}
81-
};
82-
83-
// Output the item.
84-
{
85-
$attr:ident
86-
{ $prefixed_name:expr }
87-
{ $item:item }
88-
} => {
89-
#[$attr = $prefixed_name]
73+
#[$attr = concat!(env!("RING_CORE_PREFIX"), stringify!($name))]
9074
$item
9175
};
9276
}

0 commit comments

Comments
 (0)