Skip to content

Commit e005b71

Browse files
committed
Switch to intra-doc links in std::process
1 parent 873fc46 commit e005b71

File tree

1 file changed

+37
-58
lines changed

1 file changed

+37
-58
lines changed

library/std/src/process.rs

Lines changed: 37 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,15 @@
8484
//! assert_eq!(b"test", output.stdout.as_slice());
8585
//! ```
8686
//!
87-
//! [`abort`]: fn.abort.html
88-
//! [`exit`]: fn.exit.html
87+
//! [`spawn`]: Command::spawn
88+
//! [`output`]: Command::output
8989
//!
90-
//! [`Command`]: struct.Command.html
91-
//! [`spawn`]: struct.Command.html#method.spawn
92-
//! [`output`]: struct.Command.html#method.output
90+
//! [`stdout`]: Command::stdout
91+
//! [`stdin`]: Command::stdin
92+
//! [`stderr`]: Command::stderr
9393
//!
94-
//! [`Child`]: struct.Child.html
95-
//! [`ChildStdin`]: struct.ChildStdin.html
96-
//! [`ChildStdout`]: struct.ChildStdout.html
97-
//! [`ChildStderr`]: struct.ChildStderr.html
98-
//! [`Stdio`]: struct.Stdio.html
99-
//!
100-
//! [`stdout`]: struct.Command.html#method.stdout
101-
//! [`stdin`]: struct.Command.html#method.stdin
102-
//! [`stderr`]: struct.Command.html#method.stderr
103-
//!
104-
//! [`Write`]: ../io/trait.Write.html
105-
//! [`Read`]: ../io/trait.Read.html
94+
//! [`Write`]: io::Write
95+
//! [`Read`]: io::Read
10696
10797
#![stable(feature = "process", since = "1.0.0")]
10898

@@ -130,7 +120,7 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
130120
/// run, even after the `Child` handle to the child process has gone out of
131121
/// scope.
132122
///
133-
/// Calling [`wait`](#method.wait) (or other functions that wrap around it) will make
123+
/// Calling [`wait`] (or other functions that wrap around it) will make
134124
/// the parent process wait until the child has actually exited before
135125
/// continuing.
136126
///
@@ -162,9 +152,7 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
162152
/// assert!(ecode.success());
163153
/// ```
164154
///
165-
/// [`Command`]: struct.Command.html
166-
/// [`Drop`]: ../../core/ops/trait.Drop.html
167-
/// [`wait`]: #method.wait
155+
/// [`wait`]: Child::wait
168156
#[stable(feature = "process", since = "1.0.0")]
169157
pub struct Child {
170158
handle: imp::Process,
@@ -227,9 +215,8 @@ impl fmt::Debug for Child {
227215
/// file handle will be closed. If the child process was blocked on input prior
228216
/// to being dropped, it will become unblocked after dropping.
229217
///
230-
/// [`Child`]: struct.Child.html
231-
/// [`stdin`]: struct.Child.html#structfield.stdin
232-
/// [dropped]: ../ops/trait.Drop.html
218+
/// [`stdin`]: crate::process::Child.stdin
219+
/// [dropped]: Drop
233220
#[stable(feature = "process", since = "1.0.0")]
234221
pub struct ChildStdin {
235222
inner: AnonPipe,
@@ -286,9 +273,8 @@ impl fmt::Debug for ChildStdin {
286273
/// When an instance of `ChildStdout` is [dropped], the `ChildStdout`'s
287274
/// underlying file handle will be closed.
288275
///
289-
/// [`Child`]: struct.Child.html
290-
/// [`stdout`]: struct.Child.html#structfield.stdout
291-
/// [dropped]: ../ops/trait.Drop.html
276+
/// [`stdout`]: crate::process::Child.stdout
277+
/// [dropped]: Drop
292278
#[stable(feature = "process", since = "1.0.0")]
293279
pub struct ChildStdout {
294280
inner: AnonPipe,
@@ -347,9 +333,8 @@ impl fmt::Debug for ChildStdout {
347333
/// When an instance of `ChildStderr` is [dropped], the `ChildStderr`'s
348334
/// underlying file handle will be closed.
349335
///
350-
/// [`Child`]: struct.Child.html
351-
/// [`stderr`]: struct.Child.html#structfield.stderr
352-
/// [dropped]: ../ops/trait.Drop.html
336+
/// [`stderr`]: crate::process::Child.stderr
337+
/// [dropped]: Drop
353338
#[stable(feature = "process", since = "1.0.0")]
354339
pub struct ChildStderr {
355340
inner: AnonPipe,
@@ -522,7 +507,7 @@ impl Command {
522507
///
523508
/// To pass multiple arguments see [`args`].
524509
///
525-
/// [`args`]: #method.args
510+
/// [`args`]: Command::args
526511
///
527512
/// # Examples
528513
///
@@ -547,7 +532,7 @@ impl Command {
547532
///
548533
/// To pass a single argument see [`arg`].
549534
///
550-
/// [`arg`]: #method.arg
535+
/// [`arg`]: Command::arg
551536
///
552537
/// # Examples
553538
///
@@ -700,7 +685,7 @@ impl Command {
700685
/// .expect("ls command failed to start");
701686
/// ```
702687
///
703-
/// [`canonicalize`]: ../fs/fn.canonicalize.html
688+
/// [`canonicalize`]: crate::fs::canonicalize
704689
#[stable(feature = "process", since = "1.0.0")]
705690
pub fn current_dir<P: AsRef<Path>>(&mut self, dir: P) -> &mut Command {
706691
self.inner.cwd(dir.as_ref().as_ref());
@@ -712,8 +697,8 @@ impl Command {
712697
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
713698
/// defaults to [`piped`] when used with `output`.
714699
///
715-
/// [`inherit`]: struct.Stdio.html#method.inherit
716-
/// [`piped`]: struct.Stdio.html#method.piped
700+
/// [`inherit`]: Stdio::inherit
701+
/// [`piped`]: Stdio::piped
717702
///
718703
/// # Examples
719704
///
@@ -738,8 +723,8 @@ impl Command {
738723
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
739724
/// defaults to [`piped`] when used with `output`.
740725
///
741-
/// [`inherit`]: struct.Stdio.html#method.inherit
742-
/// [`piped`]: struct.Stdio.html#method.piped
726+
/// [`inherit`]: Stdio::inherit
727+
/// [`piped`]: Stdio::piped
743728
///
744729
/// # Examples
745730
///
@@ -764,8 +749,8 @@ impl Command {
764749
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
765750
/// defaults to [`piped`] when used with `output`.
766751
///
767-
/// [`inherit`]: struct.Stdio.html#method.inherit
768-
/// [`piped`]: struct.Stdio.html#method.piped
752+
/// [`inherit`]: Stdio::inherit
753+
/// [`piped`]: Stdio::piped
769754
///
770755
/// # Examples
771756
///
@@ -893,10 +878,8 @@ impl AsInnerMut<imp::Command> for Command {
893878
/// [`Command`], or the [`wait_with_output`] method of a [`Child`]
894879
/// process.
895880
///
896-
/// [`Command`]: struct.Command.html
897-
/// [`Child`]: struct.Child.html
898-
/// [`output`]: struct.Command.html#method.output
899-
/// [`wait_with_output`]: struct.Child.html#method.wait_with_output
881+
/// [`output`]: Command::output
882+
/// [`wait_with_output`]: Child::wait_with_output
900883
#[derive(PartialEq, Eq, Clone)]
901884
#[stable(feature = "process", since = "1.0.0")]
902885
pub struct Output {
@@ -939,10 +922,9 @@ impl fmt::Debug for Output {
939922
/// Describes what to do with a standard I/O stream for a child process when
940923
/// passed to the [`stdin`], [`stdout`], and [`stderr`] methods of [`Command`].
941924
///
942-
/// [`stdin`]: struct.Command.html#method.stdin
943-
/// [`stdout`]: struct.Command.html#method.stdout
944-
/// [`stderr`]: struct.Command.html#method.stderr
945-
/// [`Command`]: struct.Command.html
925+
/// [`stdin`]: Command::stdin
926+
/// [`stdout`]: Command::stdout
927+
/// [`stderr`]: Command::stderr
946928
#[stable(feature = "process", since = "1.0.0")]
947929
pub struct Stdio(imp::Stdio);
948930

@@ -1206,10 +1188,8 @@ impl From<fs::File> for Stdio {
12061188
/// status is exposed through the [`status`] method, or the [`wait`] method
12071189
/// of a [`Child`] process.
12081190
///
1209-
/// [`Command`]: struct.Command.html
1210-
/// [`Child`]: struct.Child.html
1211-
/// [`status`]: struct.Command.html#method.status
1212-
/// [`wait`]: struct.Child.html#method.wait
1191+
/// [`status`]: Command::status
1192+
/// [`wait`]: Child::wait
12131193
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
12141194
#[stable(feature = "process", since = "1.0.0")]
12151195
pub struct ExitStatus(imp::ExitStatus);
@@ -1294,8 +1274,8 @@ impl fmt::Display for ExitStatus {
12941274
/// For the platform's canonical successful and unsuccessful codes, see
12951275
/// the [`SUCCESS`] and [`FAILURE`] associated items.
12961276
///
1297-
/// [`SUCCESS`]: #associatedconstant.SUCCESS
1298-
/// [`FAILURE`]: #associatedconstant.FAILURE
1277+
/// [`SUCCESS`]: ExitCode::SUCCESS
1278+
/// [`FAILURE`]: ExitCode::FAILURE
12991279
///
13001280
/// **Warning**: While various forms of this were discussed in [RFC #1937],
13011281
/// it was ultimately cut from that RFC, and thus this type is more subject
@@ -1349,9 +1329,9 @@ impl Child {
13491329
/// }
13501330
/// ```
13511331
///
1352-
/// [`ErrorKind`]: ../io/enum.ErrorKind.html
1353-
/// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
1354-
/// [`Other`]: ../io/enum.ErrorKind.html#variant.Other
1332+
/// [`ErrorKind`]: io::ErrorKind
1333+
/// [`InvalidInput`]: io::ErrorKind::InvalidInput
1334+
/// [`Other`]: io::ErrorKind::Other
13551335
#[stable(feature = "process", since = "1.0.0")]
13561336
pub fn kill(&mut self) -> io::Result<()> {
13571337
self.handle.kill()
@@ -1616,8 +1596,7 @@ pub fn exit(code: i32) -> ! {
16161596
/// }
16171597
/// ```
16181598
///
1619-
/// [`panic!`]: ../../std/macro.panic.html
1620-
/// [panic hook]: ../../std/panic/fn.set_hook.html
1599+
/// [panic hook]: crate::panic::set_hook
16211600
#[stable(feature = "process_abort", since = "1.17.0")]
16221601
pub fn abort() -> ! {
16231602
crate::sys::abort_internal();

0 commit comments

Comments
 (0)