Skip to content

Commit 4366059

Browse files
authored
Rollup merge of #89051 - schctl:master, r=jyn514
Add intra-doc links and small changes to `std::os` to be more consistent I believe that a few items in `std::os` should be linked. I've also added a basic example in `std::os::windows`.
2 parents 61bfe36 + ec34aa6 commit 4366059

File tree

16 files changed

+60
-15
lines changed

16 files changed

+60
-15
lines changed

library/std/src/os/linux/fs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Linux-specific extensions to primitives in the `std::fs` module.
1+
//! Linux-specific extensions to primitives in the [`std::fs`] module.
2+
//!
3+
//! [`std::fs`]: crate::fs
24
35
#![stable(feature = "metadata_ext", since = "1.1.0")]
46

library/std/src/os/linux/process.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Linux-specific extensions to primitives in the `std::process` module.
1+
//! Linux-specific extensions to primitives in the [`std::process`] module.
2+
//!
3+
//! [`std::process`]: crate::process
24
35
#![unstable(feature = "linux_pidfd", issue = "82971")]
46

library/std/src/os/unix/ffi/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Unix-specific extension to the primitives in the `std::ffi` module.
1+
//! Unix-specific extensions to primitives in the [`std::ffi`] module.
22
//!
33
//! # Examples
44
//!
@@ -31,6 +31,8 @@
3131
//! let bytes = os_str.as_bytes();
3232
//! assert_eq!(bytes, b"foo");
3333
//! ```
34+
//!
35+
//! [`std::ffi`]: crate::ffi
3436
3537
#![stable(feature = "rust1", since = "1.0.0")]
3638

library/std/src/os/unix/fs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Unix-specific extensions to primitives in the `std::fs` module.
1+
//! Unix-specific extensions to primitives in the [`std::fs`] module.
2+
//!
3+
//! [`std::fs`]: crate::fs
24
35
#![stable(feature = "rust1", since = "1.0.0")]
46

library/std/src/os/unix/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
//! exposes Unix-specific functions that would otherwise be inappropriate as
55
//! part of the core `std` library.
66
//!
7-
//! It exposes more ways to deal with platform-specific strings (`OsStr`,
8-
//! `OsString`), allows to set permissions more granularly, extract low-level
7+
//! It exposes more ways to deal with platform-specific strings ([`OsStr`],
8+
//! [`OsString`]), allows to set permissions more granularly, extract low-level
99
//! file descriptors from files and sockets, and has platform-specific helpers
1010
//! for spawning processes.
1111
//!
@@ -24,6 +24,9 @@
2424
//! Ok(())
2525
//! }
2626
//! ```
27+
//!
28+
//! [`OsStr`]: crate::ffi::OsStr
29+
//! [`OsString`]: crate::ffi::OsString
2730
2831
#![stable(feature = "rust1", since = "1.0.0")]
2932
#![doc(cfg(unix))]

library/std/src/os/unix/net/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Unix-specific networking functionality
1+
//! Unix-specific networking functionality.
22
33
#![stable(feature = "unix_socket", since = "1.10.0")]
44

library/std/src/os/unix/process.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Unix-specific extensions to primitives in the `std::process` module.
1+
//! Unix-specific extensions to primitives in the [`std::process`] module.
2+
//!
3+
//! [`std::process`]: crate::process
24
35
#![stable(feature = "rust1", since = "1.0.0")]
46

library/std/src/os/unix/thread.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Unix-specific extensions to primitives in the `std::thread` module.
1+
//! Unix-specific extensions to primitives in the [`std::thread`] module.
2+
//!
3+
//! [`std::thread`]: crate::thread
24
35
#![stable(feature = "thread_extensions", since = "1.9.0")]
46

library/std/src/os/wasi/ffi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! WASI-specific extension to the primitives in the `std::ffi` module
1+
//! WASI-specific extensions to primitives in the [`std::ffi`] module
2+
//!
3+
//! [`std::ffi`]: crate::ffi
24
35
#![stable(feature = "rust1", since = "1.0.0")]
46

library/std/src/os/wasi/fs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! WASI-specific extensions to primitives in the `std::fs` module.
1+
//! WASI-specific extensions to primitives in the [`std::fs`] module.
2+
//!
3+
//! [`std::fs`]: crate::fs
24
35
#![deny(unsafe_op_in_unsafe_fn)]
46
#![unstable(feature = "wasi_ext", issue = "71213")]

0 commit comments

Comments
 (0)