Move sys::pal::os::Env into sys::env by thaliaarchi · Pull Request #140143 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation2 Commits5 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

thaliaarchi

Although Env (as Vars), Args, path functions, and OS constants are publicly exposed via std::env, their implementations are each self-contained. Keep them separate in std::sys and make a new module, sys::env, for Env.

Also fix unsafe_op_in_unsafe_fn for Unix and update the !DynSend and !DynSync impls which had grown out of sync with the platforms (see #48005 for discussion on that).

r? joboet

Tracked in #117276.

@thaliaarchi

Although Env (as Vars), Args, path functions, and OS constants are publicly exposed via std::env, their implementations are each self-contained. Keep them separate in std::sys and make a new module, sys::env, for Env.

@thaliaarchi

@thaliaarchi

These have grown out of sync with the platforms.

@rustbot rustbot added O-hermit

Operating System: Hermit

O-SGX

Target: SGX

O-solid

Operating System: SOLID

O-unix

Operating system: Unix-like

O-wasi

Operating system: Wasi, Webassembly System Interface

O-windows

Operating system: Windows

S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Apr 22, 2025

@thaliaarchi

@thaliaarchi

Also, update the same pattern of reuse in sys::args to match.

@joboet

@bors

📌 Commit 01485c9 has been approved by joboet

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

Apr 23, 2025

Zalathar added a commit to Zalathar/rust that referenced this pull request

Apr 24, 2025

@Zalathar

Move sys::pal::os::Env into sys::env

Although Env (as Vars), Args, path functions, and OS constants are publicly exposed via std::env, their implementations are each self-contained. Keep them separate in std::sys and make a new module, sys::env, for Env.

Also fix unsafe_op_in_unsafe_fn for Unix and update the !DynSend and !DynSync impls which had grown out of sync with the platforms (see rust-lang#48005 for discussion on that).

r? joboet

Tracked in rust-lang#117276.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 24, 2025

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 25, 2025

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Apr 25, 2025

@rust-timer

Rollup merge of rust-lang#140143 - thaliaarchi:move-env-pal, r=joboet

Move sys::pal::os::Env into sys::env

Although Env (as Vars), Args, path functions, and OS constants are publicly exposed via std::env, their implementations are each self-contained. Keep them separate in std::sys and make a new module, sys::env, for Env.

Also fix unsafe_op_in_unsafe_fn for Unix and update the !DynSend and !DynSync impls which had grown out of sync with the platforms (see rust-lang#48005 for discussion on that).

r? joboet

Tracked in rust-lang#117276.

Labels

O-hermit

Operating System: Hermit

O-SGX

Target: SGX

O-solid

Operating System: SOLID

O-unix

Operating system: Unix-like

O-wasi

Operating system: Wasi, Webassembly System Interface

O-windows

Operating system: Windows

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.