Skip to content

Commit fa2bfb3

Browse files
committed
Change syntax - the previous one didn't actually work
1 parent 6a37f83 commit fa2bfb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ cfg_if! {
152152
if #[cfg(feature = "extern-const-fn")] {
153153
#[allow(unused_macros)]
154154
macro_rules! f {
155-
($(pub fn $i:ident($($arg:ident: $argty:ty),*) $($constness:ident)* -> $ret:ty {
155+
($(pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty {
156156
$($body:stmt);*
157157
})*) => ($(
158158
#[inline]
@@ -163,7 +163,7 @@ cfg_if! {
163163
}
164164
} else {
165165
macro_rules! f {
166-
($(pub fn $i:ident($($arg:ident: $argty:ty),*) $($constness:ident)* -> $ret:ty {
166+
($(pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty {
167167
$($body:stmt);*
168168
})*) => ($(
169169
#[inline]

src/unix/linux_like/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ f! {
11821182
cmsg.offset(1) as *mut ::c_uchar
11831183
}
11841184

1185-
pub fn CMSG_SPACE(length: ::c_uint) const -> ::c_uint {
1185+
pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
11861186
(CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::<cmsghdr>()))
11871187
as ::c_uint
11881188
}

0 commit comments

Comments
 (0)