File tree Expand file tree Collapse file tree 2 files changed +0
-44
lines changed Expand file tree Collapse file tree 2 files changed +0
-44
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,5 @@ fn main() {
3
3
4
4
ac. emit_expression_cfg ( "1f64.total_cmp(&2f64)" , "has_total_cmp" ) ; // 1.62
5
5
6
- ac. emit_expression_cfg ( "3.14f64.to_ne_bytes()" , "has_float_to_from_bytes" ) ;
7
-
8
6
autocfg:: rerun_path ( "build.rs" ) ;
9
7
}
Original file line number Diff line number Diff line change @@ -150,7 +150,6 @@ pub trait FromBytes: Sized {
150
150
151
151
macro_rules! float_to_from_bytes_impl {
152
152
( $T: ty, $L: expr) => {
153
- #[ cfg( has_float_to_from_bytes) ]
154
153
impl ToBytes for $T {
155
154
type Bytes = [ u8 ; $L] ;
156
155
@@ -170,7 +169,6 @@ macro_rules! float_to_from_bytes_impl {
170
169
}
171
170
}
172
171
173
- #[ cfg( has_float_to_from_bytes) ]
174
172
impl FromBytes for $T {
175
173
type Bytes = [ u8 ; $L] ;
176
174
@@ -189,46 +187,6 @@ macro_rules! float_to_from_bytes_impl {
189
187
<$T>:: from_ne_bytes( * bytes)
190
188
}
191
189
}
192
-
193
- #[ cfg( not( has_float_to_from_bytes) ) ]
194
- impl ToBytes for $T {
195
- type Bytes = [ u8 ; $L] ;
196
-
197
- #[ inline]
198
- fn to_be_bytes( & self ) -> Self :: Bytes {
199
- ToBytes :: to_be_bytes( & self . to_bits( ) )
200
- }
201
-
202
- #[ inline]
203
- fn to_le_bytes( & self ) -> Self :: Bytes {
204
- ToBytes :: to_le_bytes( & self . to_bits( ) )
205
- }
206
-
207
- #[ inline]
208
- fn to_ne_bytes( & self ) -> Self :: Bytes {
209
- ToBytes :: to_ne_bytes( & self . to_bits( ) )
210
- }
211
- }
212
-
213
- #[ cfg( not( has_float_to_from_bytes) ) ]
214
- impl FromBytes for $T {
215
- type Bytes = [ u8 ; $L] ;
216
-
217
- #[ inline]
218
- fn from_be_bytes( bytes: & Self :: Bytes ) -> Self {
219
- Self :: from_bits( FromBytes :: from_be_bytes( bytes) )
220
- }
221
-
222
- #[ inline]
223
- fn from_le_bytes( bytes: & Self :: Bytes ) -> Self {
224
- Self :: from_bits( FromBytes :: from_le_bytes( bytes) )
225
- }
226
-
227
- #[ inline]
228
- fn from_ne_bytes( bytes: & Self :: Bytes ) -> Self {
229
- Self :: from_bits( FromBytes :: from_ne_bytes( bytes) )
230
- }
231
- }
232
190
} ;
233
191
}
234
192
You can’t perform that action at this time.
0 commit comments