File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ default = ["std"]
27
27
libm = [" dep:libm" ]
28
28
std = []
29
29
30
- # Allows access to functionality only available in Rust 1.77, such as round_ties_even
31
- # This increases the MSRV to 1.77
32
- msrv_1_77 = []
33
-
34
30
# vestigial features, now always in effect
35
31
i128 = []
36
32
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ fn main() {
2
2
let ac = autocfg:: new ( ) ;
3
3
4
4
ac. emit_expression_cfg ( "1f64.total_cmp(&2f64)" , "has_total_cmp" ) ; // 1.62
5
+ ac. emit_expression_cfg ( "1.5f64.round_ties_even()" , "has_round_ties_even" ) ; // 1.77
5
6
6
7
autocfg:: rerun_path ( "build.rs" ) ;
7
8
}
Original file line number Diff line number Diff line change @@ -869,7 +869,7 @@ impl FloatCore for f32 {
869
869
Self :: powi( self , n: i32 ) -> Self ;
870
870
}
871
871
872
- #[ cfg( all( feature = "std" , feature = "msrv_1_77" ) ) ]
872
+ #[ cfg( all( feature = "std" , has_round_ties_even ) ) ]
873
873
forward ! {
874
874
Self :: round_ties_even( self ) -> Self ;
875
875
}
@@ -936,7 +936,7 @@ impl FloatCore for f64 {
936
936
Self :: powi( self , n: i32 ) -> Self ;
937
937
}
938
938
939
- #[ cfg( all( feature = "std" , feature = "msrv_1_77" ) ) ]
939
+ #[ cfg( all( feature = "std" , has_round_ties_even ) ) ]
940
940
forward ! {
941
941
Self :: round_ties_even( self ) -> Self ;
942
942
}
@@ -2549,7 +2549,7 @@ mod tests {
2549
2549
/// Compares the fallback implementation of [`round_ties_even`] to the one provided by `f32`.`
2550
2550
///
2551
2551
/// [`round_ties_even`]: crate::float::FloatCore::round_ties_even
2552
- #[ cfg( feature = "msrv_1_77" ) ]
2552
+ #[ cfg( has_round_ties_even ) ]
2553
2553
#[ test]
2554
2554
fn round_ties_even ( ) {
2555
2555
mod wrapped_f32 {
You can’t perform that action at this time.
0 commit comments