diff options
| author | bors <bors@rust-lang.org> | 2019-08-12 08:58:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-12 08:58:48 +0000 |
| commit | c01be67ea40266d6a4c3289654a07ddd7ce2a172 (patch) | |
| tree | 3c06e18f7a033f6c6121d4553f6811b33287cae1 /src/libstd | |
| parent | 72f8043d44a8925e469daf5c10e2630c80c2a7d4 (diff) | |
| parent | 9d297190c853065211c6102bcb46a8b7b9f42898 (diff) | |
| download | rust-c01be67ea40266d6a4c3289654a07ddd7ce2a172.tar.gz rust-c01be67ea40266d6a4c3289654a07ddd7ce2a172.zip | |
Auto merge of #63489 - Centril:rollup-uuf6z1s, r=Centril
Rollup of 9 pull requests Successful merges: - #62108 (Use sharded maps for queries) - #63297 (Improve pointer offset method docs) - #63406 (Suggest using a qualified path in patterns with inconsistent bindings) - #63431 (Revert "Simplify MIR generation for logical ops") - #63449 (resolve: Remove remaining special cases from built-in macros) - #63461 (docs: add stdlib env::var(_os) panic) - #63473 (Regression test for #56870) - #63474 (Add tests for issue #53598 and #57700) - #63480 (Fixes #63477) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/env.rs | 12 | ||||
| -rw-r--r-- | src/libstd/macros.rs | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 1f5de25b65c..eca93399e58 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -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 /// /// ``` @@ -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 /// /// ``` diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 839b4c5656a..f2000936b9a 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -119,7 +119,7 @@ macro_rules! print { /// Prints to the standard output, with a newline. /// /// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone -/// (no additional CARRIAGE RETURN (`\r`/`U+000D`). +/// (no additional CARRIAGE RETURN (`\r`/`U+000D`)). /// /// Use the [`format!`] syntax to write data to the standard output. /// See [`std::fmt`] for more information. |
