Skip to content

Commit 790ab24

Browse files
committed
Suppress warnings about unused macros when the std feature is not enabled
1 parent 804845b commit 790ab24

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/numeric/impl_float_maths.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use num_traits::Float;
55

66
use crate::imp_prelude::*;
77

8+
#[cfg(feature = "std")]
89
macro_rules! boolean_ops {
910
($(#[$meta1:meta])* fn $func:ident
1011
$(#[$meta2:meta])* fn $all:ident
@@ -27,6 +28,7 @@ macro_rules! boolean_ops {
2728
};
2829
}
2930

31+
#[cfg(feature = "std")]
3032
macro_rules! unary_ops {
3133
($($(#[$meta:meta])* fn $id:ident)+) => {
3234
$($(#[$meta])*
@@ -37,6 +39,7 @@ macro_rules! unary_ops {
3739
};
3840
}
3941

42+
#[cfg(feature = "std")]
4043
macro_rules! binary_ops {
4144
($($(#[$meta:meta])* fn $id:ident($ty:ty))+) => {
4245
$($(#[$meta])*

0 commit comments

Comments
 (0)