Skip to content

Commit

Permalink
Rollup merge of rust-lang#63461 - tommilligan:doc-var-panic, r=joshtr…
Browse files Browse the repository at this point in the history
…iplett

docs: add stdlib env::var(_os) panic

Closes rust-lang#63456
  • Loading branch information
Centril authored Aug 12, 2019
2 parents 124537a + af5625d commit 61e7fbd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/libstd/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ impl fmt::Debug for VarsOs {
/// * Environment variable is not present
/// * Environment variable is not valid unicode
///
/// # Panics
///
/// This function may panic if `key` is empty, contains an ASCII equals sign
/// `'='` or the NUL character `'\0'`, or when the value contains the NUL
/// character.
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -210,6 +216,12 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
///
/// [`None`]: ../option/enum.Option.html#variant.None
///
/// # Panics
///
/// This function may panic if `key` is empty, contains an ASCII equals sign
/// `'='` or the NUL character `'\0'`, or when the value contains the NUL
/// character.
///
/// # Examples
///
/// ```
Expand Down

0 comments on commit 61e7fbd

Please sign in to comment.