Skip to content

Commit cb591e5

Browse files
committed
Auto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichton
2 parents 5c82361 + fe2a47b commit cb591e5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/libstd/env.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,12 @@ impl Error for VarError {
260260
/// - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188)
261261
/// - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2)
262262
///
263+
/// # Panics
264+
///
265+
/// This function may panic if `key` is empty, contains an ASCII equals sign
266+
/// `'='` or the NUL character `'\0'`, or when the value contains the NUL
267+
/// character.
268+
///
263269
/// # Examples
264270
///
265271
/// ```
@@ -292,6 +298,12 @@ fn _set_var(k: &OsStr, v: &OsStr) {
292298
/// - [Austin Group Bugzilla](http://austingroupbugs.net/view.php?id=188)
293299
/// - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2)
294300
///
301+
/// # Panics
302+
///
303+
/// This function may panic if `key` is empty, contains an ASCII equals sign
304+
/// `'='` or the NUL character `'\0'`, or when the value contains the NUL
305+
/// character.
306+
///
295307
/// # Examples
296308
///
297309
/// ```

0 commit comments

Comments
 (0)