Skip to content

Introduce unsafe methods for mutating environment#94619

Closed
jhpratt wants to merge 1 commit into
rust-lang:masterfrom
jhpratt:unsafe-env
Closed

Introduce unsafe methods for mutating environment#94619
jhpratt wants to merge 1 commit into
rust-lang:masterfrom
jhpratt:unsafe-env

Conversation

@jhpratt

@jhpratt jhpratt commented Mar 4, 2022

Copy link
Copy Markdown
Member

As requested in #92365. I'm not sure if it's worth mentioning platforms by name in the documentation. If we do, it's possible we miss something and lead people to a false sense of security (rather than having them check single-threadedness on every platform).

For sanity purposes I've made all the implementation functions unsafe, regardless of actual safety on that OS. This ensures the API is the same for every platform.

This still needs a tracking issue to be created. Given the discussion in #92365 of a "deprecated safe", I'm not certain whether these functions will ever actually be stabilized.

@rustbot label +T-libs +C-feature-request

r? @joshtriplett

@rustbot rustbot added C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 4, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 4, 2022
@rust-log-analyzer

This comment has been minimized.

Comment thread library/std/src/env.rs Outdated
Comment thread library/std/src/env.rs Outdated
Comment thread library/std/src/env.rs Outdated
Comment thread library/std/src/env.rs Outdated
@jhpratt

jhpratt commented Mar 6, 2022

Copy link
Copy Markdown
Member Author

Just pushed up the recommended changes. I think it might be worth holding off on merging this until it's clear whether a "deprecated safe" attribute will work.

@ghost

ghost commented Mar 15, 2022

Copy link
Copy Markdown

I still have to implement it and show it will work, but the #[deprecated_safe] proposal was accepted.

@jhpratt

jhpratt commented Mar 15, 2022

Copy link
Copy Markdown
Member Author

Awesome. I'll leave this open until the initial implementation lands, at which point I think it's safe to assume this won't be accepted.

@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2022
@jhpratt

jhpratt commented May 8, 2022

Copy link
Copy Markdown
Member Author

For the same reason described in #92365, I'm marking this as blocked.

@rustbot label -S-waiting-on-review +S-blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 8, 2022
@bors

bors commented Oct 9, 2022

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #93668) made this pull request unmergeable. Please resolve the merge conflicts.

@joshtriplett

Copy link
Copy Markdown
Member

r? libs

@rustbot rustbot assigned cuviper and unassigned joshtriplett Feb 11, 2024
@Dylan-DPC Dylan-DPC removed the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Mar 9, 2024
@ehuss

ehuss commented May 31, 2024

Copy link
Copy Markdown
Contributor

Given #124866, I think this can be closed?

@jhpratt jhpratt closed this May 31, 2024
@jhpratt

jhpratt commented May 31, 2024

Copy link
Copy Markdown
Member Author

Definitely

@jhpratt jhpratt deleted the unsafe-env branch June 1, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

10 participants