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
This commit is contained in:
bors 2025-05-22 02:14:23 +00:00
commit 6eef33bb39
20 changed files with 60 additions and 60 deletions

View file

@ -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};

View file

@ -1,5 +1,5 @@
#![feature(rustc_private)]
#![feature(cfg_match)]
#![feature(cfg_select)]
#![feature(float_gamma)]
#![feature(float_erf)]
#![feature(map_try_insert)]

View file

@ -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;