rust/library/std/src
bors 9eb4a26520 Auto merge of #145489 - joshtriplett:cfg-if-not, r=Amanieu
library: Migrate from `cfg_if` to `cfg_select`

Migrate the standard library from using the external `cfg_if` crate to using the now-built-in `cfg_select` macro.

This does not yet eliminate the dependency from `library/std/Cargo.toml`, because while the standard library itself no longer uses `cfg_if`, it also incorporates the `backtrace` crate, which does.

Migration assisted by the following vim command (after selecting the full `cfg_if!` invocation):

```
'<,'>s/\(cfg_if::\)\?cfg_if/cfg_select/ | '<,'>s/^\( *\)} else {/\1}\r\1_ => {/c | '<,'>s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 => /e | '<,'>s/if #\[cfg(\(.*\))\] {/\1 => {/e
```

This is imperfect, but substantially accelerated the process. This prompts for confirmation on the `} else {` since that can also appear inside one of the arms. This also requires manual intervention to handle any multi-line conditions.
2025-08-18 19:37:33 +00:00
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections HashMap: also add "Usage with custom key types" heading 2025-08-09 19:41:41 +02:00
ffi Update version placeholders 2025-07-01 10:54:33 -07:00
fs Test(fs): Fix test_eq_windows_file_type for Windows 7 2025-05-28 12:06:25 +02:00
hash remove const_hash feature leftovers 2024-11-02 11:27:14 +01:00
io library: Migrate from cfg_if to cfg_select 2025-08-16 05:28:31 -07:00
net Set MSG_NOSIGNAL for UnixSteam 2025-06-16 09:15:17 +02:00
num Revert "Rollup merge of #143906 - LorrensP-2158466:miri-float-nondet-foreign-items, r=RalfJung" 2025-08-08 19:16:48 +02:00
os library: Migrate from cfg_if to cfg_select 2025-08-16 05:28:31 -07:00
prelude Make derive_const usable within libcore again 2025-07-17 15:42:54 +00:00
process std: Apply deprecated_safe_2024 2025-02-13 13:10:28 -08:00
sync library: Migrate from cfg_if to cfg_select 2025-08-16 05:28:31 -07:00
sys Auto merge of #145489 - joshtriplett:cfg-if-not, r=Amanieu 2025-08-18 19:37:33 +00:00
sys_common Avoid abbreviating "numerator" as "numer", to allow catching typo "numer" elsewhere 2025-08-09 15:01:58 -07:00
thread library: Migrate from cfg_if to cfg_select 2025-08-16 05:28:31 -07:00
alloc.rs Make __rust_alloc_error_handler_should_panic a function 2025-07-03 10:52:21 -07:00
ascii.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
backtrace.rs use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
bstr.rs Implement ByteStr and ByteString types 2025-01-11 06:35:21 +02:00
env.rs Rollup merge of #141840 - ChrisDenton:noempty, r=ChrisDenton 2025-07-26 22:42:32 -04:00
error.rs Move std::error unit tests to integration tests 2025-01-26 10:28:04 +00:00
fs.rs Fix typo in doc for library/std/src/fs.rs#set_permissions 2025-08-16 02:30:18 +04:00
keyword_docs.rs unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to choose its safety contract 2025-06-06 22:34:10 +02:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Auto merge of #145489 - joshtriplett:cfg-if-not, r=Amanieu 2025-08-18 19:37:33 +00:00
macros.rs feat: implement hash_map! macro 2025-08-02 01:32:52 +02:00
panic.rs Link to payload_as_str() from payload(). 2025-08-12 12:50:48 +02:00
panicking.rs Rollup merge of #144903 - Kivooeo:panic_handler-is-not-begin, r=m-ou-se 2025-08-07 19:36:36 -05:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
path.rs Rollup merge of #144870 - Kivooeo:file_prefix-stabilize, r=tgross35 2025-08-13 07:03:47 +02:00
process.rs Rollup merge of #141019 - ehuss:android-doctest-xcompile, r=Mark-Simulacrum 2025-05-23 13:34:18 +02:00
random.rs random: Provide a Distribution<T> trait 2025-07-11 10:21:34 -07:00
rt.rs deduplicate abort implementations 2025-05-15 11:20:13 +02:00
test_helpers.rs std: get rid of sys_common::io 2025-02-07 16:54:07 +01:00
time.rs Constify SystemTime methods 2025-08-12 14:05:47 -04:00