diff options
Diffstat (limited to 'vendor/num-traits/src/macros.rs')
-rw-r--r-- | vendor/num-traits/src/macros.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/num-traits/src/macros.rs b/vendor/num-traits/src/macros.rs index 4330cdfd8..b97758e42 100644 --- a/vendor/num-traits/src/macros.rs +++ b/vendor/num-traits/src/macros.rs @@ -23,7 +23,14 @@ macro_rules! forward { fn $method( $( $arg : $ty ),* ) -> $ret { <Self as $base>::$method( $( $arg ),* ) } - )*} + )*}; + ($( $imp:path as $method:ident ( self $( , $arg:ident : $ty:ty )* ) -> $ret:ty ; )*) + => {$( + #[inline] + fn $method(self $( , $arg : $ty )* ) -> $ret { + $imp(self $( , $arg )* ) + } + )*}; } macro_rules! constant { |