Skip to content

var_os never returns an error #109893

New issue

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

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

Already on GitHub? # to your account

Closed
fleetingbytes opened this issue Apr 3, 2023 · 0 comments · Fixed by #109894
Closed

var_os never returns an error #109893

fleetingbytes opened this issue Apr 3, 2023 · 0 comments · Fixed by #109894
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@fleetingbytes
Copy link
Contributor

Location

https://doc.rust-lang.org/src/std/env.rs.html#245 .. 254

Summary

std::env::var_os says it will return an error under certain circumstances. But it can't return an error.

@fleetingbytes fleetingbytes added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Apr 3, 2023
@Noratrieb Noratrieb added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 5, 2023
@bors bors closed this as completed in 8a7a665 Apr 12, 2023
evanj added a commit to evanj/rust that referenced this issue Aug 9, 2024
The documentation incorrectly stated that std::env::var could return
an error for variable names containing '=' or the NUL byte. Copy the
correct documentation from var_os.

var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which
closed Issue rust-lang#109893.

This documentation was incorrectly added in commit f2c0f29, which
replaced a panic in var_os by returning None, but documented the
change as "May error if ...".

Reference the specific error values and link to them.
evanj added a commit to evanj/rust that referenced this issue Aug 9, 2024
The documentation incorrectly stated that std::env::var could return
an error for variable names containing '=' or the NUL byte. Copy the
correct documentation from var_os.

var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which
closed Issue rust-lang#109893.

This documentation was incorrectly added in commit f2c0f29, which
replaced a panic in var_os by returning None, but documented the
change as "May error if ...".

Reference the specific error values and link to them.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 18, 2024
…rkingjubilee

doc: std::env::var: Returns None for names with '=' or NUL byte

The documentation incorrectly stated that std::env::var could return an error for variable names containing '=' or the NUL byte. Copy the correct documentation from var_os.

var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which closed Issue rust-lang#109893.

This documentation was incorrectly added in commit f2c0f29, which replaced a panic in var_os by returning None, but documented the change as "May error if ...".

Reference the specific error values and link to them.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 18, 2024
…rkingjubilee

doc: std::env::var: Returns None for names with '=' or NUL byte

The documentation incorrectly stated that std::env::var could return an error for variable names containing '=' or the NUL byte. Copy the correct documentation from var_os.

var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which closed Issue rust-lang#109893.

This documentation was incorrectly added in commit f2c0f29, which replaced a panic in var_os by returning None, but documented the change as "May error if ...".

Reference the specific error values and link to them.
tgross35 added a commit to tgross35/rust that referenced this issue Aug 19, 2024
…rkingjubilee

doc: std::env::var: Returns None for names with '=' or NUL byte

The documentation incorrectly stated that std::env::var could return an error for variable names containing '=' or the NUL byte. Copy the correct documentation from var_os.

var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which closed Issue rust-lang#109893.

This documentation was incorrectly added in commit f2c0f29, which replaced a panic in var_os by returning None, but documented the change as "May error if ...".

Reference the specific error values and link to them.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 19, 2024
Rollup merge of rust-lang#128902 - evanj:evan.jones/env-var-doc, r=workingjubilee

doc: std::env::var: Returns None for names with '=' or NUL byte

The documentation incorrectly stated that std::env::var could return an error for variable names containing '=' or the NUL byte. Copy the correct documentation from var_os.

var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which closed Issue rust-lang#109893.

This documentation was incorrectly added in commit f2c0f29, which replaced a panic in var_os by returning None, but documented the change as "May error if ...".

Reference the specific error values and link to them.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants