diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-15 17:52:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-15 17:52:37 +0200 |
| commit | c4c5e0baee408c8da6a44bb01e96ab6ad600f6b8 (patch) | |
| tree | cf2c3de74b66097c58820866a47a22049b5bdc25 | |
| parent | 9fe4630797c46cf226f3b12efc452dc4b2c9cd89 (diff) | |
| parent | cfe2e4660d7b6a37cab534935f67eda5dace49a9 (diff) | |
| download | rust-c4c5e0baee408c8da6a44bb01e96ab6ad600f6b8.tar.gz rust-c4c5e0baee408c8da6a44bb01e96ab6ad600f6b8.zip | |
Rollup merge of #112621 - GrigorenkoPV:env, r=jyn514
Mention `env!` in `option_env!`'s docs `env!` mentions that there is an alternative that returns an `Option<...>` instead of emitting a compile error. Now `option_env!` also mentions that there is an alternative that emits a compile error instead of returning an `Option<...>`.
| -rw-r--r-- | library/core/src/macros/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index c4134dbcd25..45e5b76272e 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -960,6 +960,8 @@ pub(crate) mod builtin { /// /// A compile time error is never emitted when using this macro regardless /// of whether the environment variable is present or not. + /// To emit a compile error if the environment variable is not present, + /// use the [`env!`] macro instead. /// /// # Examples /// |
