rust/compiler
Chris Denton 709f4fee50
Rollup merge of #139868 - thaliaarchi:move-env-consts-pal, r=joboet
Move `pal::env` to `std::sys::env_consts`

Combine the `std::env::consts` platform implementations as a single file. Use the Unix file as the base, since it has 28 entries, and fold the 8 singleton platforms into it. The Unix file was roughly grouped into Linux, Apple, BSD, and everything else, roughly in alphabetical order. Alphabetically order them to make it easier to maintain and discard the Unix-specific groups to generalize it to all platforms.

I'd prefer to have no fallback implementation, as I consider it a bug; however TEEOS, Trusty, and Xous have no definitions here. Since they otherwise have `pal` abstractions, that indicates that there are several platforms without `pal` abstractions which are also missing here. To support unsupported, create a little macro to handle the fallback case and not introduce ordering between the `cfg`s like `cfg_if!`.

I've named the module `std::sys::env_consts`, because they are used in `std::env::consts` and I intend to use the name `std::sys::env` for the combination of `Args` and `Vars`.

cc `@joboet` `@ChrisDenton`

Tracked in #117276.
2025-04-19 15:09:35 +00:00
..
rustc Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_abi Initial UnsafePinned/UnsafeUnpin impl [Part 1: Libs] 2025-04-13 01:11:04 -04:00
rustc_arena Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_ast Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_ast_passes Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_ast_pretty Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
rustc_attr_data_structures add rustc_macro_edition_2021 2025-03-19 17:37:35 +01:00
rustc_attr_parsing Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Auto merge of #139114 - m-ou-se:super-let-pin, r=davidtwco 2025-04-19 08:01:53 +00:00
rustc_builtin_macros Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_codegen_cranelift Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_codegen_gcc Fix import 2025-04-19 00:08:03 +02:00
rustc_codegen_llvm Rollup merge of #138599 - adwinwhite:recursive-overflow, r=wesleywiser 2025-04-18 05:17:53 +02:00
rustc_codegen_ssa Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_const_eval Rollup merge of #139974 - Patrick-6:change-visibility, r=RalfJung 2025-04-17 21:53:27 +02:00
rustc_data_structures Switch to diagnostic::on_unimplemented 2025-04-14 01:38:18 +02:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
rustc_error_codes Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_error_messages update cfgs 2025-04-09 12:29:59 +01:00
rustc_errors Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_expand Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
rustc_feature Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_fluent_macro Replace proc_macro::SourceFile by Span::{file, local_file}. 2025-04-11 15:07:08 +02:00
rustc_fs_util Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_hir_analysis Rollup merge of #138528 - dianne:implicit-deref-patterns, r=Nadrieril 2025-04-18 05:16:28 +02:00
rustc_hir_pretty Fix HIR pretty-printing of fns with just a variadic arg. 2025-04-15 10:41:10 +10:00
rustc_hir_typeck Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
rustc_incremental Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
rustc_index Add copy_within to IndexSlice 2025-04-15 10:44:28 -04:00
rustc_index_macros In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
rustc_infer Auto merge of #139768 - compiler-errors:split-fold, r=lcnr 2025-04-16 01:46:01 +00:00
rustc_interface Stabilize -Zdwarf-version as -Cdwarf-version 2025-04-14 21:26:41 -05:00
rustc_lexer Replace rustc_lexer/unescape with rustc-literal-escaper crate 2025-04-04 14:44:45 +02:00
rustc_lint Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_lint_defs Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
rustc_llvm Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
rustc_log Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_macros Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_metadata Rollup merge of #139834 - ChrisDenton:spf, r=WaffleLapkin 2025-04-19 15:09:35 +00:00
rustc_middle Rollup merge of #138528 - dianne:implicit-deref-patterns, r=Nadrieril 2025-04-18 05:16:28 +02:00
rustc_mir_build Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_mir_dataflow Avoid an unwrap in RustcMirAttrs::set_field. 2025-04-17 09:51:32 +10:00
rustc_mir_transform Rollup merge of #139902 - lcnr:no-opaque-cast-projection, r=oli-obk 2025-04-17 17:40:28 +02:00
rustc_monomorphize Rollup merge of #139498 - alexcrichton:wasm-zst-safe, r=wesleywiser 2025-04-17 21:53:24 +02:00
rustc_next_trait_solver Don't assemble non-env/bound candidates if projection is rigid 2025-04-18 01:44:06 +00:00
rustc_parse Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_parse_format Update rustc-literal-escaper version to 0.0.2 2025-04-04 22:26:10 +02:00
rustc_passes Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
rustc_pattern_analysis Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_privacy Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_query_impl Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
rustc_query_system Rollup merge of #139236 - Zoxc:anon-counter, r=davidtwco 2025-04-17 00:14:24 +02:00
rustc_resolve Rollup merge of #139084 - petrochenkov:transpaque, r=davidtwco 2025-04-17 00:14:24 +02:00
rustc_sanitizers Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_serialize Bump FileEncoder buffer size to 64 kB 2025-04-10 18:52:03 +02:00
rustc_session Rollup merge of #139850 - xizheyin:issue-138698, r=jieyouxu 2025-04-17 17:40:27 +02:00
rustc_smir Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_span Rollup merge of #139091 - mejrs:format, r=compiler-errors 2025-04-19 15:09:33 +00:00
rustc_symbol_mangling Rollup merge of #139848 - nnethercote:kw-Empty-5, r=compiler-errors 2025-04-15 21:16:05 +02:00
rustc_target Rollup merge of #139868 - thaliaarchi:move-env-consts-pal, r=joboet 2025-04-19 15:09:35 +00:00
rustc_trait_selection Rollup merge of #139091 - mejrs:format, r=compiler-errors 2025-04-19 15:09:33 +00:00
rustc_traits re-use sized fast path 2025-04-09 10:42:26 +00:00
rustc_transmute transmutability: Refactor tests for simplicity 2025-04-16 15:27:18 -07:00
rustc_ty_utils Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_type_ir Fix replacing supertrait aliases in ReplaceProjectionWith 2025-04-16 20:05:55 +00:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00
stable_mir let rustc_smir host stable_mir for refactoring 2025-04-05 18:23:07 +08:00