Closed
Description
This is a tracking issue for making std::env::{set_var, remove_var}
unsafe to call in Rust 2024.
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement in nightly Rust 2024 for
std::env::{set_var, remove_var}
. - Implement migration lints for
rustc_deprecated_safe_2024
. - Implement in nightly Rust 2024 for
CommandExt::before_exec
. - N/A: Add documentation to the dev guide.
- See the instructions.
- N/A: Add documentation to the reference.
- See the instructions.
- Add documentation to the edition guide.
- Ensure ready for Rust 2024 stabilization.
Unresolved Questions
TODO.
Related
- Make
std::env::{set_var, remove_var}
unsafe in edition 2024 #124636 - set_var/remove_var are unsound in combination with C code that reads the environment #27970
- Consider deprecating and/or modifying behavior of std::env::set_var #90308
- Don't trigger
unsafe_op_in_unsafe_fn
for deprecated safe fns #125925 - Remove lock guarantee from
std::env::{set_var, remove_var}
#125937 - CommandExt::before_exec: deprecate safety in edition 2024 #125970
- Rename
deprecated_safe
lint todeprecated_safe_2024
#125990 - Add TODO comment to unsafe env modification #126019
- Allow to customize
// TODO:
comment for deprecated safe autofix #127857