diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2015-10-25 20:03:42 +0000 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2015-10-25 20:03:42 +0000 |
| commit | fe2a47b88a5c35b2076b195ad09d3bc2c5b1c7d5 (patch) | |
| tree | 697cccd9e485af1438fdf4c0b5f9e6a606b2c97a | |
| parent | 5794950c2d81097935a2430a8a06ba43fe3c4049 (diff) | |
| download | rust-fe2a47b88a5c35b2076b195ad09d3bc2c5b1c7d5.tar.gz rust-fe2a47b88a5c35b2076b195ad09d3bc2c5b1c7d5.zip | |
Say that `std::env::{set_var, unset_var}` *may* panic
Previously the documentation suggested that the documentation about the panics are guarantees.
| -rw-r--r-- | src/libstd/env.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 685139a7fc1..1f6761b54cb 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -262,8 +262,9 @@ impl Error for VarError { /// /// # Panics /// -/// This function panics if the `key` string is empty or contains an ASCII -/// equals sign. +/// 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 /// @@ -299,8 +300,9 @@ fn _set_var(k: &OsStr, v: &OsStr) { /// /// # Panics /// -/// This function panics if the `key` string is empty or contains an ASCII -/// equals sign. +/// 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 /// |
