File tree Expand file tree Collapse file tree 11 files changed +26
-60
lines changed Expand file tree Collapse file tree 11 files changed +26
-60
lines changed Original file line number Diff line number Diff line change @@ -326,20 +326,6 @@ macro_rules! safe_f {
326326 ) +} ;
327327}
328328
329- /// Define a nonpublic function.
330- macro_rules! const_fn {
331- ( $(
332- $( #[ $attr: meta] ) *
333- const fn $i: ident( $( $arg: ident: $argty: ty) ,* $( , ) * ) -> $ret: ty
334- $body: block
335- ) * ) => ( $(
336- #[ inline]
337- $( #[ $attr] ) *
338- const fn $i( $( $arg: $argty) ,* ) -> $ret
339- $body
340- ) * )
341- }
342-
343329macro_rules! __item {
344330 ( $i: item) => {
345331 $i
Original file line number Diff line number Diff line change @@ -1421,10 +1421,8 @@ pub const RTAX_MPLS2: c_int = 9;
14211421pub const RTAX_MPLS3 : c_int = 10 ;
14221422pub const RTAX_MAX : c_int = 11 ;
14231423
1424- const_fn ! {
1425- const fn _CMSG_ALIGN( n: usize ) -> usize {
1426- ( n + ( size_of:: <c_long>( ) - 1 ) ) & !( size_of:: <c_long>( ) - 1 )
1427- }
1424+ const fn _CMSG_ALIGN ( n : usize ) -> usize {
1425+ ( n + ( size_of :: < c_long > ( ) - 1 ) ) & !( size_of :: < c_long > ( ) - 1 )
14281426}
14291427
14301428f ! {
Original file line number Diff line number Diff line change @@ -4655,10 +4655,8 @@ pub const fn MAP_ALIGNED(a: c_int) -> c_int {
46554655 a << 24
46564656}
46574657
4658- const_fn ! {
4659- const fn _ALIGN( p: usize ) -> usize {
4660- ( p + _ALIGNBYTES) & !_ALIGNBYTES
4661- }
4658+ const fn _ALIGN ( p : usize ) -> usize {
4659+ ( p + _ALIGNBYTES) & !_ALIGNBYTES
46624660}
46634661
46644662f ! {
Original file line number Diff line number Diff line change @@ -2300,10 +2300,8 @@ pub const TFD_NONBLOCK: i32 = crate::O_NONBLOCK;
23002300pub const TFD_TIMER_ABSTIME : i32 = crate :: O_WRONLY ;
23012301pub const TFD_TIMER_CANCEL_ON_SET : i32 = crate :: O_RDWR ;
23022302
2303- const_fn ! {
2304- const fn _ALIGN( p: usize ) -> usize {
2305- ( p + _ALIGNBYTES) & !_ALIGNBYTES
2306- }
2303+ const fn _ALIGN ( p : usize ) -> usize {
2304+ ( p + _ALIGNBYTES) & !_ALIGNBYTES
23072305}
23082306
23092307f ! {
Original file line number Diff line number Diff line change @@ -1851,10 +1851,8 @@ pub const RTAX_STATIC: c_int = 13;
18511851pub const RTAX_SEARCH : c_int = 14 ;
18521852pub const RTAX_MAX : c_int = 15 ;
18531853
1854- const_fn ! {
1855- const fn _ALIGN( p: usize ) -> usize {
1856- ( p + _ALIGNBYTES) & !_ALIGNBYTES
1857- }
1854+ const fn _ALIGN ( p : usize ) -> usize {
1855+ ( p + _ALIGNBYTES) & !_ALIGNBYTES
18581856}
18591857
18601858f ! {
Original file line number Diff line number Diff line change @@ -1928,10 +1928,8 @@ safe_f! {
19281928 }
19291929}
19301930
1931- const_fn ! {
1932- const fn CMSG_ALIGN ( len: usize ) -> usize {
1933- len + size_of:: <usize >( ) - 1 & !( size_of:: <usize >( ) - 1 )
1934- }
1931+ const fn CMSG_ALIGN ( len : usize ) -> usize {
1932+ len + size_of :: < usize > ( ) - 1 & !( size_of :: < usize > ( ) - 1 )
19351933}
19361934
19371935extern "C" {
Original file line number Diff line number Diff line change @@ -1512,10 +1512,8 @@ pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x10;
15121512pub const POSIX_SPAWN_SETSIGMASK : c_short = 0x20 ;
15131513pub const POSIX_SPAWN_SETSID : c_short = 0x40 ;
15141514
1515- const_fn ! {
1516- const fn CMSG_ALIGN ( len: usize ) -> usize {
1517- len + size_of:: <usize >( ) - 1 & !( size_of:: <usize >( ) - 1 )
1518- }
1515+ const fn CMSG_ALIGN ( len : usize ) -> usize {
1516+ len + size_of :: < usize > ( ) - 1 & !( size_of :: < usize > ( ) - 1 )
15191517}
15201518
15211519f ! {
Original file line number Diff line number Diff line change @@ -3414,10 +3414,8 @@ pub const PTHREAD_STACK_MIN: size_t = 0;
34143414// Non-public helper constants
34153415const _UTSNAME_LENGTH: usize = 1024 ;
34163416
3417- const_fn ! {
3418- const fn CMSG_ALIGN ( len: usize ) -> usize {
3419- ( len + size_of:: <usize >( ) - 1 ) & !( size_of:: <usize >( ) - 1 )
3420- }
3417+ const fn CMSG_ALIGN ( len : usize ) -> usize {
3418+ ( len + size_of :: < usize > ( ) - 1 ) & !( size_of :: < usize > ( ) - 1 )
34213419}
34223420
34233421// functions
Original file line number Diff line number Diff line change @@ -1821,10 +1821,8 @@ cfg_if! {
18211821 }
18221822}
18231823
1824- const_fn ! {
1825- const fn CMSG_ALIGN ( len: usize ) -> usize {
1826- ( len + size_of:: <usize >( ) - 1 ) & !( size_of:: <usize >( ) - 1 )
1827- }
1824+ const fn CMSG_ALIGN ( len : usize ) -> usize {
1825+ ( len + size_of :: < usize > ( ) - 1 ) & !( size_of :: < usize > ( ) - 1 )
18281826}
18291827
18301828f ! {
Original file line number Diff line number Diff line change @@ -2606,14 +2606,12 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
26062606 __spare : 0 ,
26072607} ;
26082608
2609- const_fn ! {
2610- const fn _CMSG_ALIGN( len: usize ) -> usize {
2611- len + size_of:: <usize >( ) - 1 & !( size_of:: <usize >( ) - 1 )
2612- }
2609+ const fn _CMSG_ALIGN ( len : usize ) -> usize {
2610+ len + size_of :: < usize > ( ) - 1 & !( size_of :: < usize > ( ) - 1 )
2611+ }
26132612
2614- const fn _ALIGN( p: usize , b: usize ) -> usize {
2615- ( p + b - 1 ) & !( b - 1 )
2616- }
2613+ const fn _ALIGN ( p : usize , b : usize ) -> usize {
2614+ ( p + b - 1 ) & !( b - 1 )
26172615}
26182616
26192617f ! {
You can’t perform that action at this time.
0 commit comments