Skip to content

Commit

Permalink
Rollup merge of rust-lang#40283 - oconnor663:args_docs, r=alexcrichton
Browse files Browse the repository at this point in the history
clarify docs for Args and ArgsOs

The args() and args_os() docs include a line about how the first element
is usually the program name. Include that line in the struct docs too.
  • Loading branch information
GuillaumeGomez authored Mar 6, 2017
2 parents ebef91a + 03b83a0 commit 5cbe5fa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libstd/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,10 @@ pub fn current_exe() -> io::Result<PathBuf> {
///
/// This structure is created through the [`std::env::args`] function.
///
/// The first element is traditionally the path of the executable, but it can be
/// set to arbitrary text, and may not even exist. This means this property should
/// not be relied upon for security purposes.
///
/// [`String`]: ../string/struct.String.html
/// [`std::env::args`]: ./fn.args.html
#[stable(feature = "env", since = "1.0.0")]
Expand All @@ -600,6 +604,10 @@ pub struct Args { inner: ArgsOs }
///
/// This structure is created through the [`std::env::args_os`] function.
///
/// The first element is traditionally the path of the executable, but it can be
/// set to arbitrary text, and may not even exist. This means this property should
/// not be relied upon for security purposes.
///
/// [`OsString`]: ../ffi/struct.OsString.html
/// [`std::env::args_os`]: ./fn.args_os.html
#[stable(feature = "env", since = "1.0.0")]
Expand Down

0 comments on commit 5cbe5fa

Please sign in to comment.