diff options
| author | bors <bors@rust-lang.org> | 2025-05-22 02:14:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-22 02:14:23 +0000 |
| commit | 6eef33bb399cabfab16aa4e0825895f5f32f4e26 (patch) | |
| tree | d5ad348ac4a4f699ed35aafc4327a09faaa62dd0 /library/core/src/num | |
| parent | 5df0f729f5355cb3cd91f6bcff13566ae96dc220 (diff) | |
| parent | 999967a57dce987bbad353d152f03c3ef67d41f2 (diff) | |
| download | rust-6eef33bb399cabfab16aa4e0825895f5f32f4e26.tar.gz rust-6eef33bb399cabfab16aa4e0825895f5f32f4e26.zip | |
Auto merge of #137198 - tgross35:cfg-match-rename, r=Amanieu
Rename `cfg_match!` to `cfg_select!` [`@Nemo157` pointed out](https://github.com/rust-lang/rust/issues/115585#issuecomment-2346307605) that `cfg_match!` syntax does not actually align well with match syntax, which is a possible source of confusion. The comment points out that usage is instead more similar to ecosystem `select!` macros. Rename `cfg_match!` to `cfg_select!` to match this. Tracking issue: https://github.com/rust-lang/rust/issues/115585 [1]: https://github.com/rust-lang/rust/issues/115585#issuecomment-2346307605
Diffstat (limited to 'library/core/src/num')
| -rw-r--r-- | library/core/src/num/f32.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index 43bf414d6be..bf67b6ed05a 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -14,7 +14,7 @@ use crate::convert::FloatToInt; use crate::num::FpCategory; use crate::panic::const_assert; -use crate::{cfg_match, intrinsics, mem}; +use crate::{cfg_select, intrinsics, mem}; /// The radix or base of the internal representation of `f32`. /// Use [`f32::RADIX`] instead. @@ -990,7 +990,7 @@ impl f32 { #[stable(feature = "num_midpoint", since = "1.85.0")] #[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")] pub const fn midpoint(self, other: f32) -> f32 { - cfg_match! { + cfg_select! { // Allow faster implementation that have known good 64-bit float // implementations. Falling back to the branchy code on targets that don't // have 64-bit hardware floats or buggy implementations. |
