about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2021-05-17 18:52:13 +0200
committerGitHub <noreply@github.com>2021-05-17 18:52:13 +0200
commit360db9c3843436a64ca3768e98a718a258ff2990 (patch)
tree1355b895b710c234218a3476df51eeb8c649d1f5
parentaf1ac55cbf8ebf6f1486d7cf55b8f8386188b7f8 (diff)
parent383642714a5a28bdcd14689827c145d1f8c056a6 (diff)
downloadrust-360db9c3843436a64ca3768e98a718a258ff2990.tar.gz
rust-360db9c3843436a64ca3768e98a718a258ff2990.zip
Rollup merge of #85409 - CDirkx:cfg_redox, r=nagisa
Simplify `cfg(any(unix, target_os="redox"))` in example to just `cfg(unix)`

Update example for `OsString` that handled `redox` seperately from `unix`: Redox has been completely integrated under `target_family="unix"`, so `cfg(unix)` implies `target_os="redox"`

https://github.com/rust-lang/rust/blob/35dbef235048f9a2939dc20effe083ca483c37ff/compiler/rustc_target/src/spec/redox_base.rs#L26
-rw-r--r--library/std/src/ffi/os_str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs
index ea4b2866017..ca391ffb3d5 100644
--- a/library/std/src/ffi/os_str.rs
+++ b/library/std/src/ffi/os_str.rs
@@ -601,7 +601,7 @@ impl OsStr {
     /// // sequences simply through collecting user command line arguments, for
     /// // example.
     ///
-    /// #[cfg(any(unix, target_os = "redox"))] {
+    /// #[cfg(unix)] {
     ///     use std::ffi::OsStr;
     ///     use std::os::unix::ffi::OsStrExt;
     ///