Code change:
all(target_vendor = "fortanix", target_env = "sgx") ) ))] <del> mod doc { // On certain platforms right now the "main modules" modules that are // documented don't compile (missing things in `libc` which is empty), // so just omit them with an empty module. #[unstable(issue = "none", feature = "std_internals")] pub mod unix {} #[unstable(issue = "none", feature = "std_internals")] pub mod linux {} #[unstable(issue = "none", feature = "std_internals")] pub mod wasi {} #[unstable(issue = "none", feature = "std_internals")] pub mod windows {} } #[cfg(doc)] #[stable(feature = "os", since = "1.0.0")] pub use doc::*; #[cfg(not(doc))] #[path = "."] mod imp { // If we're not documenting std then we only expose modules appropriate for the // current platform. #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] pub mod fortanix_sgx; #[cfg(target_os = "hermit")] #[path = "hermit/mod.rs"] pub mod unix; </del> <ins> #[unstable(issue = "none", feature = "std_internals")] pub mod linux {} #[cfg(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) ))] #[unstable(issue = "none", feature = "std_internals")] pub mod wasi {} #[cfg(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) ))] #[unstable(issue = "none", feature = "std_internals")] pub mod windows {} </ins> <del> #[cfg(target_os = "android")] pub mod android; #[cfg(target_os = "dragonfly")] pub mod dragonfly; #[cfg(target_os = "emscripten")] pub mod emscripten; #[cfg(target_os = "espidf")] pub mod espidf; #[cfg(target_os = "freebsd")] pub mod freebsd; #[cfg(target_os = "fuchsia")] pub mod fuchsia; #[cfg(target_os = "haiku")] pub mod haiku; #[cfg(target_os = "illumos")] pub mod illumos; #[cfg(target_os = "ios")] pub mod ios; #[cfg(target_os = "l4re")] pub mod linux; #[cfg(target_os = "linux")] pub mod linux; #[cfg(target_os = "macos")] pub mod macos; #[cfg(target_os = "netbsd")] pub mod netbsd; #[cfg(target_os = "openbsd")] pub mod openbsd; #[cfg(target_os = "redox")] pub mod redox; #[cfg(target_os = "solaris")] pub mod solaris; #[cfg(unix)] pub mod unix; </del> <ins> // unix #[cfg(not(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) )))] #[cfg(target_os = "hermit")] #[path = "hermit/mod.rs"] pub mod unix; #[cfg(not(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) )))] #[cfg(all(not(target_os = "hermit"), any(unix, doc)))] pub mod unix; </ins> <del> #[cfg(target_os = "vxworks")] pub mod vxworks; </del> <ins> // linux #[cfg(not(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) )))] #[cfg(any(target_os = "linux", target_os = "l4re", doc))] pub mod linux; </ins> <del> #[cfg(target_os = "wasi")] pub mod wasi; </del> <ins> // wasi #[cfg(not(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) )))] #[cfg(any(target_os = "wasi", doc))] pub mod wasi; </ins> <del> #[cfg(windows)] pub mod windows; } #[cfg(not(doc))] #[stable(feature = "os", since = "1.0.0")] pub use imp::*; </del> <ins> // windows #[cfg(not(all( doc, any( all(target_arch = "wasm32", not(target_os = "wasi")), all(target_vendor = "fortanix", target_env = "sgx") ) )))] #[cfg(any(windows, doc))] pub mod windows; // Others. #[cfg(target_os = "android")] pub mod android; #[cfg(target_os = "dragonfly")] pub mod dragonfly; #[cfg(target_os = "emscripten")] pub mod emscripten; #[cfg(target_os = "espidf")] pub mod espidf; #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] pub mod fortanix_sgx; #[cfg(target_os = "freebsd")] pub mod freebsd; #[cfg(target_os = "fuchsia")] pub mod fuchsia; #[cfg(target_os = "haiku")] pub mod haiku; #[cfg(target_os = "illumos")] pub mod illumos; #[cfg(target_os = "ios")] pub mod ios; #[cfg(target_os = "macos")] pub mod macos; #[cfg(target_os = "netbsd")] pub mod netbsd; #[cfg(target_os = "openbsd")] pub mod openbsd; #[cfg(target_os = "redox")] pub mod redox; #[cfg(target_os = "solaris")] pub mod solaris; #[cfg(target_os = "vxworks")] pub mod vxworks; </ins> #[cfg(any(unix, target_os = "wasi", doc))] mod fd;

Related discussion:
text: More information on
To be clear, I'm not actually sure that's a private link, I didn't look at it in detail. It might just be doc(hidden) or something.
I didn't either. Just that most of weird things happening are in .