about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-27 04:45:39 +0000
committerbors <bors@rust-lang.org>2015-10-27 04:45:39 +0000
commitcb591e517ab83a9511552b95166640fdc8c11d7e (patch)
tree31e6559723fe584645842ab377763e55a6c4a86a /src/libstd
parent5c823615e6cac2d80d6256d76735e690418268f2 (diff)
parentfe2a47b88a5c35b2076b195ad09d3bc2c5b1c7d5 (diff)
downloadrust-cb591e517ab83a9511552b95166640fdc8c11d7e.tar.gz
rust-cb591e517ab83a9511552b95166640fdc8c11d7e.zip
Auto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichton
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/env.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index 518c67bbe7f..1f6761b54cb 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -260,6 +260,12 @@ impl Error for VarError {
 ///  - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188)
 ///  - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2)
 ///
+/// # 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
 ///
 /// ```
@@ -292,6 +298,12 @@ fn _set_var(k: &OsStr, v: &OsStr) {
 ///  - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188)
 ///  - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2)
 ///
+/// # 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
 ///
 /// ```