Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::env::var should mention env! or option_env! #138159

Closed
cyrgani opened this issue Mar 7, 2025 · 3 comments · Fixed by #138189
Closed

std::env::var should mention env! or option_env! #138159

cyrgani opened this issue Mar 7, 2025 · 3 comments · Fixed by #138189
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@cyrgani
Copy link
Contributor

cyrgani commented Mar 7, 2025

Location

std::env::var

Summary

std::env::var operates at runtime, env! and option_env! at compile time.
The reverse link from the macro to the function exists already, but env! / option_env! should also be mentioned in std::env::var's docs.

@cyrgani cyrgani added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Mar 7, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 7, 2025
@GuillaumeGomez
Copy link
Member

Interested into sending a fix?

@jieyouxu jieyouxu added T-libs Relevant to the library team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 7, 2025
@CosminPerRam
Copy link

I'm up for the fix if OP is not.

@GuillaumeGomez
Copy link
Member

Sorry, only saw your message after opening #138189...

@bors bors closed this as completed in 6576d35 Mar 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 8, 2025
Rollup merge of rust-lang#138189 - GuillaumeGomez:env-var, r=joshtriplett

Mention `env` and `option_env` macros in `std::env::var` docs

Fixes rust-lang#138159.

Just like there are mentions in `env!` and `option_env!` docs to `std::env::var`, it'd be nice to have a "mention back" as well.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this issue Mar 14, 2025
…lett

Mention `env` and `option_env` macros in `std::env::var` docs

Fixes rust-lang#138159.

Just like there are mentions in `env!` and `option_env!` docs to `std::env::var`, it'd be nice to have a "mention back" as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants