84
84
//! assert_eq!(b"test", output.stdout.as_slice());
85
85
//! ```
86
86
//!
87
- //! [`abort `]: fn.abort.html
88
- //! [`exit `]: fn.exit.html
87
+ //! [`spawn `]: Command::spawn
88
+ //! [`output `]: Command::output
89
89
//!
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
93
93
//!
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
106
96
107
97
#![ stable( feature = "process" , since = "1.0.0" ) ]
108
98
@@ -130,7 +120,7 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
130
120
/// run, even after the `Child` handle to the child process has gone out of
131
121
/// scope.
132
122
///
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
134
124
/// the parent process wait until the child has actually exited before
135
125
/// continuing.
136
126
///
@@ -162,9 +152,7 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
162
152
/// assert!(ecode.success());
163
153
/// ```
164
154
///
165
- /// [`Command`]: struct.Command.html
166
- /// [`Drop`]: ../../core/ops/trait.Drop.html
167
- /// [`wait`]: #method.wait
155
+ /// [`wait`]: Child::wait
168
156
#[ stable( feature = "process" , since = "1.0.0" ) ]
169
157
pub struct Child {
170
158
handle : imp:: Process ,
@@ -227,9 +215,8 @@ impl fmt::Debug for Child {
227
215
/// file handle will be closed. If the child process was blocked on input prior
228
216
/// to being dropped, it will become unblocked after dropping.
229
217
///
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
233
220
#[ stable( feature = "process" , since = "1.0.0" ) ]
234
221
pub struct ChildStdin {
235
222
inner : AnonPipe ,
@@ -286,9 +273,8 @@ impl fmt::Debug for ChildStdin {
286
273
/// When an instance of `ChildStdout` is [dropped], the `ChildStdout`'s
287
274
/// underlying file handle will be closed.
288
275
///
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
292
278
#[ stable( feature = "process" , since = "1.0.0" ) ]
293
279
pub struct ChildStdout {
294
280
inner : AnonPipe ,
@@ -347,9 +333,8 @@ impl fmt::Debug for ChildStdout {
347
333
/// When an instance of `ChildStderr` is [dropped], the `ChildStderr`'s
348
334
/// underlying file handle will be closed.
349
335
///
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
353
338
#[ stable( feature = "process" , since = "1.0.0" ) ]
354
339
pub struct ChildStderr {
355
340
inner : AnonPipe ,
@@ -522,7 +507,7 @@ impl Command {
522
507
///
523
508
/// To pass multiple arguments see [`args`].
524
509
///
525
- /// [`args`]: #method. args
510
+ /// [`args`]: Command:: args
526
511
///
527
512
/// # Examples
528
513
///
@@ -547,7 +532,7 @@ impl Command {
547
532
///
548
533
/// To pass a single argument see [`arg`].
549
534
///
550
- /// [`arg`]: #method. arg
535
+ /// [`arg`]: Command:: arg
551
536
///
552
537
/// # Examples
553
538
///
@@ -700,7 +685,7 @@ impl Command {
700
685
/// .expect("ls command failed to start");
701
686
/// ```
702
687
///
703
- /// [`canonicalize`]: ../fs/fn. canonicalize.html
688
+ /// [`canonicalize`]: crate::fs:: canonicalize
704
689
#[ stable( feature = "process" , since = "1.0.0" ) ]
705
690
pub fn current_dir < P : AsRef < Path > > ( & mut self , dir : P ) -> & mut Command {
706
691
self . inner . cwd ( dir. as_ref ( ) . as_ref ( ) ) ;
@@ -712,8 +697,8 @@ impl Command {
712
697
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
713
698
/// defaults to [`piped`] when used with `output`.
714
699
///
715
- /// [`inherit`]: struct. Stdio.html#method. inherit
716
- /// [`piped`]: struct. Stdio.html#method. piped
700
+ /// [`inherit`]: Stdio:: inherit
701
+ /// [`piped`]: Stdio:: piped
717
702
///
718
703
/// # Examples
719
704
///
@@ -738,8 +723,8 @@ impl Command {
738
723
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
739
724
/// defaults to [`piped`] when used with `output`.
740
725
///
741
- /// [`inherit`]: struct. Stdio.html#method. inherit
742
- /// [`piped`]: struct. Stdio.html#method. piped
726
+ /// [`inherit`]: Stdio:: inherit
727
+ /// [`piped`]: Stdio:: piped
743
728
///
744
729
/// # Examples
745
730
///
@@ -764,8 +749,8 @@ impl Command {
764
749
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
765
750
/// defaults to [`piped`] when used with `output`.
766
751
///
767
- /// [`inherit`]: struct. Stdio.html#method. inherit
768
- /// [`piped`]: struct. Stdio.html#method. piped
752
+ /// [`inherit`]: Stdio:: inherit
753
+ /// [`piped`]: Stdio:: piped
769
754
///
770
755
/// # Examples
771
756
///
@@ -893,10 +878,8 @@ impl AsInnerMut<imp::Command> for Command {
893
878
/// [`Command`], or the [`wait_with_output`] method of a [`Child`]
894
879
/// process.
895
880
///
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
900
883
#[ derive( PartialEq , Eq , Clone ) ]
901
884
#[ stable( feature = "process" , since = "1.0.0" ) ]
902
885
pub struct Output {
@@ -939,10 +922,9 @@ impl fmt::Debug for Output {
939
922
/// Describes what to do with a standard I/O stream for a child process when
940
923
/// passed to the [`stdin`], [`stdout`], and [`stderr`] methods of [`Command`].
941
924
///
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
946
928
#[ stable( feature = "process" , since = "1.0.0" ) ]
947
929
pub struct Stdio ( imp:: Stdio ) ;
948
930
@@ -1206,10 +1188,8 @@ impl From<fs::File> for Stdio {
1206
1188
/// status is exposed through the [`status`] method, or the [`wait`] method
1207
1189
/// of a [`Child`] process.
1208
1190
///
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
1213
1193
#[ derive( PartialEq , Eq , Clone , Copy , Debug ) ]
1214
1194
#[ stable( feature = "process" , since = "1.0.0" ) ]
1215
1195
pub struct ExitStatus ( imp:: ExitStatus ) ;
@@ -1294,8 +1274,8 @@ impl fmt::Display for ExitStatus {
1294
1274
/// For the platform's canonical successful and unsuccessful codes, see
1295
1275
/// the [`SUCCESS`] and [`FAILURE`] associated items.
1296
1276
///
1297
- /// [`SUCCESS`]: #associatedconstant. SUCCESS
1298
- /// [`FAILURE`]: #associatedconstant. FAILURE
1277
+ /// [`SUCCESS`]: ExitCode:: SUCCESS
1278
+ /// [`FAILURE`]: ExitCode:: FAILURE
1299
1279
///
1300
1280
/// **Warning**: While various forms of this were discussed in [RFC #1937],
1301
1281
/// it was ultimately cut from that RFC, and thus this type is more subject
@@ -1349,9 +1329,9 @@ impl Child {
1349
1329
/// }
1350
1330
/// ```
1351
1331
///
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
1355
1335
#[ stable( feature = "process" , since = "1.0.0" ) ]
1356
1336
pub fn kill ( & mut self ) -> io:: Result < ( ) > {
1357
1337
self . handle . kill ( )
@@ -1616,8 +1596,7 @@ pub fn exit(code: i32) -> ! {
1616
1596
/// }
1617
1597
/// ```
1618
1598
///
1619
- /// [`panic!`]: ../../std/macro.panic.html
1620
- /// [panic hook]: ../../std/panic/fn.set_hook.html
1599
+ /// [panic hook]: crate::panic::set_hook
1621
1600
#[ stable( feature = "process_abort" , since = "1.17.0" ) ]
1622
1601
pub fn abort ( ) -> ! {
1623
1602
crate :: sys:: abort_internal ( ) ;
0 commit comments