Skip to content

Conversation

@ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Jun 11, 2024

People tend to skim or skip over long explanations so we should be very upfront that set_var and remove_var are being made unsafe for a very good reason.

This is just the conclusion restated almost verbatim but earlier in the docs and separated from the explanation:

rust/library/std/src/env.rs

Lines 338 to 339 in 0c96061

/// that no other thread will read the environment, so the only safe option is
/// to not use `set_var` or `remove_var` in multi-threaded programs at all.

I think this may help with people who may not be entirely comfortable with #125937 being rejected.

@rustbot
Copy link
Collaborator

rustbot commented Jun 11, 2024

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 11, 2024
@jhpratt
Copy link
Member

jhpratt commented Jun 12, 2024

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 12, 2024

📌 Commit 751143e has been approved by jhpratt

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 12, 2024
@bors bors merged commit 0805ab4 into rust-lang:master Jun 12, 2024
@rustbot rustbot added this to the 1.81.0 milestone Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants