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 ,
@@ -248,9 +236,8 @@ impl fmt::Debug for Child {
248
236
/// file handle will be closed. If the child process was blocked on input prior
249
237
/// to being dropped, it will become unblocked after dropping.
250
238
///
251
- /// [`Child`]: struct.Child.html
252
- /// [`stdin`]: struct.Child.html#structfield.stdin
253
- /// [dropped]: ../ops/trait.Drop.html
239
+ /// [`stdin`]: Child::stdin
240
+ /// [dropped]: Drop
254
241
#[ stable( feature = "process" , since = "1.0.0" ) ]
255
242
pub struct ChildStdin {
256
243
inner : AnonPipe ,
@@ -307,9 +294,8 @@ impl fmt::Debug for ChildStdin {
307
294
/// When an instance of `ChildStdout` is [dropped], the `ChildStdout`'s
308
295
/// underlying file handle will be closed.
309
296
///
310
- /// [`Child`]: struct.Child.html
311
- /// [`stdout`]: struct.Child.html#structfield.stdout
312
- /// [dropped]: ../ops/trait.Drop.html
297
+ /// [`stdout`]: Child::stdout
298
+ /// [dropped]: Drop
313
299
#[ stable( feature = "process" , since = "1.0.0" ) ]
314
300
pub struct ChildStdout {
315
301
inner : AnonPipe ,
@@ -368,9 +354,8 @@ impl fmt::Debug for ChildStdout {
368
354
/// When an instance of `ChildStderr` is [dropped], the `ChildStderr`'s
369
355
/// underlying file handle will be closed.
370
356
///
371
- /// [`Child`]: struct.Child.html
372
- /// [`stderr`]: struct.Child.html#structfield.stderr
373
- /// [dropped]: ../ops/trait.Drop.html
357
+ /// [`stderr`]: Child::stderr
358
+ /// [dropped]: Drop
374
359
#[ stable( feature = "process" , since = "1.0.0" ) ]
375
360
pub struct ChildStderr {
376
361
inner : AnonPipe ,
@@ -543,7 +528,7 @@ impl Command {
543
528
///
544
529
/// To pass multiple arguments see [`args`].
545
530
///
546
- /// [`args`]: #method. args
531
+ /// [`args`]: Command:: args
547
532
///
548
533
/// # Examples
549
534
///
@@ -568,7 +553,7 @@ impl Command {
568
553
///
569
554
/// To pass a single argument see [`arg`].
570
555
///
571
- /// [`arg`]: #method. arg
556
+ /// [`arg`]: Command:: arg
572
557
///
573
558
/// # Examples
574
559
///
@@ -721,7 +706,7 @@ impl Command {
721
706
/// .expect("ls command failed to start");
722
707
/// ```
723
708
///
724
- /// [`canonicalize`]: ../fs/fn. canonicalize.html
709
+ /// [`canonicalize`]: crate::fs:: canonicalize
725
710
#[ stable( feature = "process" , since = "1.0.0" ) ]
726
711
pub fn current_dir < P : AsRef < Path > > ( & mut self , dir : P ) -> & mut Command {
727
712
self . inner . cwd ( dir. as_ref ( ) . as_ref ( ) ) ;
@@ -733,8 +718,8 @@ impl Command {
733
718
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
734
719
/// defaults to [`piped`] when used with `output`.
735
720
///
736
- /// [`inherit`]: struct. Stdio.html#method. inherit
737
- /// [`piped`]: struct. Stdio.html#method. piped
721
+ /// [`inherit`]: Stdio:: inherit
722
+ /// [`piped`]: Stdio:: piped
738
723
///
739
724
/// # Examples
740
725
///
@@ -759,8 +744,8 @@ impl Command {
759
744
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
760
745
/// defaults to [`piped`] when used with `output`.
761
746
///
762
- /// [`inherit`]: struct. Stdio.html#method. inherit
763
- /// [`piped`]: struct. Stdio.html#method. piped
747
+ /// [`inherit`]: Stdio:: inherit
748
+ /// [`piped`]: Stdio:: piped
764
749
///
765
750
/// # Examples
766
751
///
@@ -785,8 +770,8 @@ impl Command {
785
770
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
786
771
/// defaults to [`piped`] when used with `output`.
787
772
///
788
- /// [`inherit`]: struct. Stdio.html#method. inherit
789
- /// [`piped`]: struct. Stdio.html#method. piped
773
+ /// [`inherit`]: Stdio:: inherit
774
+ /// [`piped`]: Stdio:: piped
790
775
///
791
776
/// # Examples
792
777
///
@@ -914,10 +899,8 @@ impl AsInnerMut<imp::Command> for Command {
914
899
/// [`Command`], or the [`wait_with_output`] method of a [`Child`]
915
900
/// process.
916
901
///
917
- /// [`Command`]: struct.Command.html
918
- /// [`Child`]: struct.Child.html
919
- /// [`output`]: struct.Command.html#method.output
920
- /// [`wait_with_output`]: struct.Child.html#method.wait_with_output
902
+ /// [`output`]: Command::output
903
+ /// [`wait_with_output`]: Child::wait_with_output
921
904
#[ derive( PartialEq , Eq , Clone ) ]
922
905
#[ stable( feature = "process" , since = "1.0.0" ) ]
923
906
pub struct Output {
@@ -960,10 +943,9 @@ impl fmt::Debug for Output {
960
943
/// Describes what to do with a standard I/O stream for a child process when
961
944
/// passed to the [`stdin`], [`stdout`], and [`stderr`] methods of [`Command`].
962
945
///
963
- /// [`stdin`]: struct.Command.html#method.stdin
964
- /// [`stdout`]: struct.Command.html#method.stdout
965
- /// [`stderr`]: struct.Command.html#method.stderr
966
- /// [`Command`]: struct.Command.html
946
+ /// [`stdin`]: Command::stdin
947
+ /// [`stdout`]: Command::stdout
948
+ /// [`stderr`]: Command::stderr
967
949
#[ stable( feature = "process" , since = "1.0.0" ) ]
968
950
pub struct Stdio ( imp:: Stdio ) ;
969
951
@@ -1227,10 +1209,8 @@ impl From<fs::File> for Stdio {
1227
1209
/// status is exposed through the [`status`] method, or the [`wait`] method
1228
1210
/// of a [`Child`] process.
1229
1211
///
1230
- /// [`Command`]: struct.Command.html
1231
- /// [`Child`]: struct.Child.html
1232
- /// [`status`]: struct.Command.html#method.status
1233
- /// [`wait`]: struct.Child.html#method.wait
1212
+ /// [`status`]: Command::status
1213
+ /// [`wait`]: Child::wait
1234
1214
#[ derive( PartialEq , Eq , Clone , Copy , Debug ) ]
1235
1215
#[ stable( feature = "process" , since = "1.0.0" ) ]
1236
1216
pub struct ExitStatus ( imp:: ExitStatus ) ;
@@ -1315,8 +1295,8 @@ impl fmt::Display for ExitStatus {
1315
1295
/// For the platform's canonical successful and unsuccessful codes, see
1316
1296
/// the [`SUCCESS`] and [`FAILURE`] associated items.
1317
1297
///
1318
- /// [`SUCCESS`]: #associatedconstant. SUCCESS
1319
- /// [`FAILURE`]: #associatedconstant. FAILURE
1298
+ /// [`SUCCESS`]: ExitCode:: SUCCESS
1299
+ /// [`FAILURE`]: ExitCode:: FAILURE
1320
1300
///
1321
1301
/// **Warning**: While various forms of this were discussed in [RFC #1937],
1322
1302
/// it was ultimately cut from that RFC, and thus this type is more subject
@@ -1370,9 +1350,9 @@ impl Child {
1370
1350
/// }
1371
1351
/// ```
1372
1352
///
1373
- /// [`ErrorKind`]: ../io/enum. ErrorKind.html
1374
- /// [`InvalidInput`]: ../io/enum. ErrorKind.html#variant. InvalidInput
1375
- /// [`Other`]: ../io/enum. ErrorKind.html#variant. Other
1353
+ /// [`ErrorKind`]: io:: ErrorKind
1354
+ /// [`InvalidInput`]: io:: ErrorKind:: InvalidInput
1355
+ /// [`Other`]: io:: ErrorKind:: Other
1376
1356
#[ stable( feature = "process" , since = "1.0.0" ) ]
1377
1357
pub fn kill ( & mut self ) -> io:: Result < ( ) > {
1378
1358
self . handle . kill ( )
@@ -1637,8 +1617,7 @@ pub fn exit(code: i32) -> ! {
1637
1617
/// }
1638
1618
/// ```
1639
1619
///
1640
- /// [`panic!`]: ../../std/macro.panic.html
1641
- /// [panic hook]: ../../std/panic/fn.set_hook.html
1620
+ /// [panic hook]: crate::panic::set_hook
1642
1621
#[ stable( feature = "process_abort" , since = "1.17.0" ) ]
1643
1622
pub fn abort ( ) -> ! {
1644
1623
crate :: sys:: abort_internal ( ) ;
0 commit comments