rust/library
bors e9182f195b Auto merge of #143461 - folkertdev:cfg-select-builtin-macro, r=petrochenkov
make `cfg_select` a builtin macro

tracking issue: https://github.com/rust-lang/rust/issues/115585

This parses mostly the same as the `macro cfg_select` version, except:

1. wrapping in double brackets is no longer supported (or needed): `cfg_select {{ /* ... */ }}` is now rejected.
2. in an expression context, the rhs is no longer wrapped in a block, so that this now works:
  ```rust
  fn main() {
      println!(cfg_select! {
          unix => { "foo" }
          _ => { "bar" }
      });
  }
  ```
3. a single wildcard rule is now supported: `cfg_select { _ => 1 }` now works

I've also added an error if none of the rules evaluate to true, and warnings for any arms that follow the `_` wildcard rule.

cc `@traviscross` if I'm missing any feature that should/should not be included
r? `@petrochenkov` for the macro logic details
2025-07-13 18:34:13 +00:00
..
alloc Auto merge of #134628 - estebank:const-default, r=oli-obk 2025-07-08 14:04:40 +00:00
alloctests Add test for int_format_into feature 2025-07-03 18:57:16 +02:00
backtrace@b65ab935fb Update the backtrace submodule 2025-06-16 07:00:13 +00:00
compiler-builtins Rollup merge of #143660 - cuviper:lib-doc-false, r=tgross35 2025-07-10 20:28:50 +02:00
core Auto merge of #143461 - folkertdev:cfg-select-builtin-macro, r=petrochenkov 2025-07-13 18:34:13 +00:00
coretests Auto merge of #143461 - folkertdev:cfg-select-builtin-macro, r=petrochenkov 2025-07-13 18:34:13 +00:00
panic_abort Use the in-tree compiler-builtins 2025-06-08 02:36:58 +00:00
panic_unwind Win: Use exceptions with empty data for SEH panic exception copies 2025-07-08 22:07:42 +02:00
portable-simd use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
proc_macro Rollup merge of #141996 - Daniel-Aaron-Bloom:dollar_crate, r=petrochenkov 2025-07-10 03:23:52 -04:00
profiler_builtins Fix profiler_builtins build script to handle full path to profiler lib 2025-04-11 16:57:38 +02:00
rtstartup Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc-std-workspace-alloc Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
rustc-std-workspace-core make compiler_builtins a private dependency 2025-06-30 20:27:10 -04:00
rustc-std-workspace-std Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
std Rollup merge of #143776 - no1wudi:fix, r=tgross35 2025-07-13 07:21:19 +02:00
stdarch Prepare for merging from rust-lang/rust 2025-07-08 16:18:46 +02:00
sysroot Rollup merge of #143660 - cuviper:lib-doc-false, r=tgross35 2025-07-10 20:28:50 +02:00
test Add new test_main_with_exit_callback public function in libtest to allow a callback to be called before exiting 2025-05-06 18:17:48 +02:00
unwind Upgrade the standard library unwinding version 2025-06-11 20:05:06 +00:00
windows_targets Fix backtrace for cygwin 2025-05-07 13:08:19 +08:00
Cargo.lock Auto merge of #140999 - hkBst:update-escaper, r=nnethercote 2025-06-25 01:03:30 +00:00
Cargo.toml Auto merge of #140999 - hkBst:update-escaper, r=nnethercote 2025-06-25 01:03:30 +00:00