Skip to content

Commit 16a41bf

Browse files
authored
Unrolled build for rust-lang#128535
Rollup merge of rust-lang#128535 - mmvanheusden:master, r=workingjubilee Format `std::env::consts` docstrings with markdown backticks This clarifies possible outputs the constants might be. **Before:** -- <img src="https://github.com/user-attachments/assets/8ee8772a-7562-42a2-89be-f8772b76dbd5" width="500px"> **After:** -- <img src="https://github.com/user-attachments/assets/4632e5e2-db3e-4372-b13e-006cc1701eb1" width="500px">
2 parents e9e13a6 + 0328c86 commit 16a41bf

File tree

1 file changed

+107
-66
lines changed

1 file changed

+107
-66
lines changed

library/std/src/env.rs

+107-66
Original file line numberDiff line numberDiff line change
@@ -935,106 +935,147 @@ impl fmt::Debug for ArgsOs {
935935
pub mod consts {
936936
use crate::sys::env::os;
937937

938-
/// A string describing the architecture of the CPU that is currently
939-
/// in use.
938+
/// A string describing the architecture of the CPU that is currently in use.
939+
/// An example value may be: `"x86"`, `"arm"` or `"riscv64"`.
940940
///
941-
/// Some possible values:
941+
/// <details><summary>Full list of possible values</summary>
942942
///
943-
/// - x86
944-
/// - x86_64
945-
/// - arm
946-
/// - aarch64
947-
/// - loongarch64
948-
/// - m68k
949-
/// - csky
950-
/// - mips
951-
/// - mips64
952-
/// - powerpc
953-
/// - powerpc64
954-
/// - riscv64
955-
/// - s390x
956-
/// - sparc64
943+
/// * `"x86"`
944+
/// * `"x86_64"`
945+
/// * `"arm"`
946+
/// * `"aarch64"`
947+
/// * `"m68k"`
948+
/// * `"mips"`
949+
/// * `"mips32r6"`
950+
/// * `"mips64"`
951+
/// * `"mips64r6"`
952+
/// * `"csky"`
953+
/// * `"powerpc"`
954+
/// * `"powerpc64"`
955+
/// * `"riscv32"`
956+
/// * `"riscv64"`
957+
/// * `"s390x"`
958+
/// * `"sparc"`
959+
/// * `"sparc64"`
960+
/// * `"hexagon"`
961+
/// * `"loongarch64"`
962+
///
963+
/// </details>
957964
#[stable(feature = "env", since = "1.0.0")]
958965
pub const ARCH: &str = env!("STD_ENV_ARCH");
959966

960-
/// The family of the operating system. Example value is `unix`.
967+
/// A string describing the family of the operating system.
968+
/// An example value may be: `"unix"`, or `"windows"`.
969+
///
970+
/// This value may be an empty string if the family is unknown.
971+
///
972+
/// <details><summary>Full list of possible values</summary>
961973
///
962-
/// Some possible values:
974+
/// * `"unix"`
975+
/// * `"windows"`
976+
/// * `"itron"`
977+
/// * `"wasm"`
978+
/// * `""`
963979
///
964-
/// - unix
965-
/// - windows
980+
/// </details>
966981
#[stable(feature = "env", since = "1.0.0")]
967982
pub const FAMILY: &str = os::FAMILY;
968983

969984
/// A string describing the specific operating system in use.
970-
/// Example value is `linux`.
985+
/// An example value may be: `"linux"`, or `"freebsd"`.
971986
///
972-
/// Some possible values:
987+
/// <details><summary>Full list of possible values</summary>
973988
///
974-
/// - linux
975-
/// - macos
976-
/// - ios
977-
/// - freebsd
978-
/// - dragonfly
979-
/// - netbsd
980-
/// - openbsd
981-
/// - solaris
982-
/// - android
983-
/// - windows
989+
/// * `"linux"`
990+
/// * `"windows"`
991+
/// * `"macos"`
992+
/// * `"android"`
993+
/// * `"ios"`
994+
/// * `"openbsd"`
995+
/// * `"freebsd"`
996+
/// * `"netbsd"`
997+
/// * `"wasi"`
998+
/// * `"hermit"`
999+
/// * `"aix"`
1000+
/// * `"apple"`
1001+
/// * `"dragonfly"`
1002+
/// * `"emscripten"`
1003+
/// * `"espidf"`
1004+
/// * `"fortanix"`
1005+
/// * `"uefi"`
1006+
/// * `"fuchsia"`
1007+
/// * `"haiku"`
1008+
/// * `"hermit"`
1009+
/// * `"watchos"`
1010+
/// * `"visionos"`
1011+
/// * `"tvos"`
1012+
/// * `"horizon"`
1013+
/// * `"hurd"`
1014+
/// * `"illumos"`
1015+
/// * `"l4re"`
1016+
/// * `"nto"`
1017+
/// * `"redox"`
1018+
/// * `"solaris"`
1019+
/// * `"solid_asp3`
1020+
/// * `"vita"`
1021+
/// * `"vxworks"`
1022+
/// * `"xous"`
1023+
///
1024+
/// </details>
9841025
#[stable(feature = "env", since = "1.0.0")]
9851026
pub const OS: &str = os::OS;
9861027

987-
/// Specifies the filename prefix used for shared libraries on this
988-
/// platform. Example value is `lib`.
989-
///
990-
/// Some possible values:
991-
///
992-
/// - lib
993-
/// - `""` (an empty string)
1028+
/// Specifies the filename prefix, if any, used for shared libraries on this platform.
1029+
/// This is either `"lib"` or an empty string. (`""`).
9941030
#[stable(feature = "env", since = "1.0.0")]
9951031
pub const DLL_PREFIX: &str = os::DLL_PREFIX;
9961032

997-
/// Specifies the filename suffix used for shared libraries on this
998-
/// platform. Example value is `.so`.
999-
///
1000-
/// Some possible values:
1033+
/// Specifies the filename suffix, if any, used for shared libraries on this platform.
1034+
/// An example value may be: `".so"`, `".elf"`, or `".dll"`.
10011035
///
1002-
/// - .so
1003-
/// - .dylib
1004-
/// - .dll
1036+
/// The possible values are identical to those of [`DLL_EXTENSION`], but with the leading period included.
10051037
#[stable(feature = "env", since = "1.0.0")]
10061038
pub const DLL_SUFFIX: &str = os::DLL_SUFFIX;
10071039

1008-
/// Specifies the file extension used for shared libraries on this
1009-
/// platform that goes after the dot. Example value is `so`.
1040+
/// Specifies the file extension, if any, used for shared libraries on this platform that goes after the dot.
1041+
/// An example value may be: `"so"`, `"elf"`, or `"dll"`.
1042+
///
1043+
/// <details><summary>Full list of possible values</summary>
10101044
///
1011-
/// Some possible values:
1045+
/// * `"so"`
1046+
/// * `"dylib"`
1047+
/// * `"dll"`
1048+
/// * `"sgxs"`
1049+
/// * `"a"`
1050+
/// * `"elf"`
1051+
/// * `"wasm"`
1052+
/// * `""` (an empty string)
10121053
///
1013-
/// - so
1014-
/// - dylib
1015-
/// - dll
1054+
/// </details>
10161055
#[stable(feature = "env", since = "1.0.0")]
10171056
pub const DLL_EXTENSION: &str = os::DLL_EXTENSION;
10181057

1019-
/// Specifies the filename suffix used for executable binaries on this
1020-
/// platform. Example value is `.exe`.
1058+
/// Specifies the filename suffix, if any, used for executable binaries on this platform.
1059+
/// An example value may be: `".exe"`, or `".efi"`.
10211060
///
1022-
/// Some possible values:
1023-
///
1024-
/// - .exe
1025-
/// - .nexe
1026-
/// - .pexe
1027-
/// - `""` (an empty string)
1061+
/// The possible values are identical to those of [`EXE_EXTENSION`], but with the leading period included.
10281062
#[stable(feature = "env", since = "1.0.0")]
10291063
pub const EXE_SUFFIX: &str = os::EXE_SUFFIX;
10301064

1031-
/// Specifies the file extension, if any, used for executable binaries
1032-
/// on this platform. Example value is `exe`.
1065+
/// Specifies the file extension, if any, used for executable binaries on this platform.
1066+
/// An example value may be: `"exe"`, or an empty string (`""`).
1067+
///
1068+
/// <details><summary>Full list of possible values</summary>
10331069
///
1034-
/// Some possible values:
1070+
/// * `"exe"`
1071+
/// * `"efi"`
1072+
/// * `"js"`
1073+
/// * `"sgxs"`
1074+
/// * `"elf"`
1075+
/// * `"wasm"`
1076+
/// * `""` (an empty string)
10351077
///
1036-
/// - exe
1037-
/// - `""` (an empty string)
1078+
/// </details>
10381079
#[stable(feature = "env", since = "1.0.0")]
10391080
pub const EXE_EXTENSION: &str = os::EXE_EXTENSION;
10401081
}

0 commit comments

Comments
 (0)