about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-22 02:14:23 +0000
committerbors <bors@rust-lang.org>2025-05-22 02:14:23 +0000
commit6eef33bb399cabfab16aa4e0825895f5f32f4e26 (patch)
treed5ad348ac4a4f699ed35aafc4327a09faaa62dd0 /src
parent5df0f729f5355cb3cd91f6bcff13566ae96dc220 (diff)
parent999967a57dce987bbad353d152f03c3ef67d41f2 (diff)
downloadrust-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 'src')
-rw-r--r--src/tools/miri/src/concurrency/mod.rs2
-rw-r--r--src/tools/miri/src/lib.rs2
-rw-r--r--src/tools/miri/src/shims/unix/fs.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/miri/src/concurrency/mod.rs b/src/tools/miri/src/concurrency/mod.rs
index dd33f90f153..17d0f3f5ff6 100644
--- a/src/tools/miri/src/concurrency/mod.rs
+++ b/src/tools/miri/src/concurrency/mod.rs
@@ -9,7 +9,7 @@ mod vector_clock;
 pub mod weak_memory;
 
 // Import either the real genmc adapter or a dummy module.
-cfg_match! {
+cfg_select! {
     feature = "genmc" => {
         mod genmc;
         pub use self::genmc::{GenmcCtx, GenmcConfig};
diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs
index 329a7e56bc0..b87682a7caf 100644
--- a/src/tools/miri/src/lib.rs
+++ b/src/tools/miri/src/lib.rs
@@ -1,5 +1,5 @@
 #![feature(rustc_private)]
-#![feature(cfg_match)]
+#![feature(cfg_select)]
 #![feature(float_gamma)]
 #![feature(float_erf)]
 #![feature(map_try_insert)]
diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs
index 1f6acff0787..3bcfe3f1e4d 100644
--- a/src/tools/miri/src/shims/unix/fs.rs
+++ b/src/tools/miri/src/shims/unix/fs.rs
@@ -90,7 +90,7 @@ impl UnixFileDescription for FileHandle {
         op: FlockOp,
     ) -> InterpResult<'tcx, io::Result<()>> {
         assert!(communicate_allowed, "isolation should have prevented even opening a file");
-        cfg_match! {
+        cfg_select! {
             all(target_family = "unix", not(target_os = "solaris")) => {
                 use std::os::fd::AsRawFd;