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"]
2727libm = [" dep:libm" ]
2828std = []
2929
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-
3430# vestigial features, now always in effect
3531i128 = []
3632
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ fn main() {
22 let ac = autocfg:: new ( ) ;
33
44 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
56
67 autocfg:: rerun_path ( "build.rs" ) ;
78}
Original file line number Diff line number Diff line change @@ -869,7 +869,7 @@ impl FloatCore for f32 {
869869 Self :: powi( self , n: i32 ) -> Self ;
870870 }
871871
872- #[ cfg( all( feature = "std" , feature = "msrv_1_77" ) ) ]
872+ #[ cfg( all( feature = "std" , has_round_ties_even ) ) ]
873873 forward ! {
874874 Self :: round_ties_even( self ) -> Self ;
875875 }
@@ -936,7 +936,7 @@ impl FloatCore for f64 {
936936 Self :: powi( self , n: i32 ) -> Self ;
937937 }
938938
939- #[ cfg( all( feature = "std" , feature = "msrv_1_77" ) ) ]
939+ #[ cfg( all( feature = "std" , has_round_ties_even ) ) ]
940940 forward ! {
941941 Self :: round_ties_even( self ) -> Self ;
942942 }
@@ -2549,7 +2549,7 @@ mod tests {
25492549 /// Compares the fallback implementation of [`round_ties_even`] to the one provided by `f32`.`
25502550 ///
25512551 /// [`round_ties_even`]: crate::float::FloatCore::round_ties_even
2552- #[ cfg( feature = "msrv_1_77" ) ]
2552+ #[ cfg( has_round_ties_even ) ]
25532553 #[ test]
25542554 fn round_ties_even ( ) {
25552555 mod wrapped_f32 {
You can’t perform that action at this time.
0 commit comments