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

Introduce unsafe methods for mutating environment #94619

Closed
wants to merge 1 commit into from

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Mar 4, 2022

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.

library/std/src/env.rs Outdated Show resolved Hide resolved
library/std/src/env.rs Outdated Show resolved Hide resolved
library/std/src/env.rs Outdated Show resolved Hide resolved
library/std/src/env.rs Outdated Show resolved Hide resolved
@jhpratt
Copy link
Member Author

jhpratt commented Mar 6, 2022

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
Copy link

ghost commented Mar 15, 2022

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

@jhpratt
Copy link
Member Author

jhpratt commented Mar 15, 2022

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
Copy link
Member Author

jhpratt commented May 8, 2022

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
Copy link
Contributor

bors commented Oct 9, 2022

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

@joshtriplett
Copy link
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
Copy link
Contributor

ehuss commented May 31, 2024

Given #124866, I think this can be closed?

@jhpratt jhpratt closed this May 31, 2024
@jhpratt
Copy link
Member Author

jhpratt commented May 31, 2024

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