diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-11-23 12:18:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-23 12:18:10 +0100 |
| commit | cfc7fce2f09d71ccdfc21f87fd8c082a405612b3 (patch) | |
| tree | b3a226071839a8c94efc198d20685c1a14701922 /src/libstd | |
| parent | 881115c89651b24cd2bba08b362f68f7a8d4749b (diff) | |
| parent | 9170ddf1e4b71d03069acf266d30f7b6af68cc83 (diff) | |
| download | rust-cfc7fce2f09d71ccdfc21f87fd8c082a405612b3.tar.gz rust-cfc7fce2f09d71ccdfc21f87fd8c082a405612b3.zip | |
Rollup merge of #37925 - jtdowney:env-args-doc-links, r=steveklabnik
Add some internal docs links for Args/ArgsOs In many places the docs link to other sections and I noticed it was lacking here. Not sure if there is a standard for if inter-linking is appropriate.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/env.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index e29dbe35c5a..baa2b5d2846 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -546,17 +546,23 @@ pub fn current_exe() -> io::Result<PathBuf> { os_imp::current_exe() } -/// An iterator over the arguments of a process, yielding a `String` value +/// An iterator over the arguments of a process, yielding a [`String`] value /// for each argument. /// -/// This structure is created through the `std::env::args` method. +/// This structure is created through the [`std::env::args`] method. +/// +/// [`String`]: ../string/struct.String.html +/// [`std::env::args`]: ./fn.args.html #[stable(feature = "env", since = "1.0.0")] pub struct Args { inner: ArgsOs } -/// An iterator over the arguments of a process, yielding an `OsString` value +/// An iterator over the arguments of a process, yielding an [`OsString`] value /// for each argument. /// -/// This structure is created through the `std::env::args_os` method. +/// This structure is created through the [`std::env::args_os`] method. +/// +/// [`OsString`]: ../ffi/struct.OsString.html +/// [`std::env::args_os`]: ./fn.args_os.html #[stable(feature = "env", since = "1.0.0")] pub struct ArgsOs { inner: sys::args::Args } @@ -571,7 +577,7 @@ pub struct ArgsOs { inner: sys::args::Args } /// /// The returned iterator will panic during iteration if any argument to the /// process is not valid unicode. If this is not desired, -/// use the `args_os` function instead. +/// use the [`args_os`] function instead. /// /// # Examples /// @@ -583,6 +589,8 @@ pub struct ArgsOs { inner: sys::args::Args } /// println!("{}", argument); /// } /// ``` +/// +/// [`args_os`]: ./fn.args_os.html #[stable(feature = "env", since = "1.0.0")] pub fn args() -> Args { Args { inner: args_os() } |
