close
Skip to content

Ensure Send/Sync is not implemented for std::env::Vars{,Os}#155153

Open
Mark-Simulacrum wants to merge 1 commit intorust-lang:mainfrom
Mark-Simulacrum:env-vars
Open

Ensure Send/Sync is not implemented for std::env::Vars{,Os}#155153
Mark-Simulacrum wants to merge 1 commit intorust-lang:mainfrom
Mark-Simulacrum:env-vars

Conversation

@Mark-Simulacrum
Copy link
Copy Markdown
Member

@Mark-Simulacrum Mark-Simulacrum commented Apr 11, 2026

On some platforms, it looks like these are not currently Send/Sync. We have a negative impl in env/common.rs. This is a breaking change on a bunch of targets, but it makes it less likely that someone unintentionally/accidentally depends on this. This is a potentially partial list but should be fairly complete. These are all platforms where these previously were unsupported, so this is relatively unlikely to actually break them.

aarch64-unknown-none, aarch64-unknown-none-softfloat, armv7a-none-eabi, armv7a-none-eabihf, armv7r-none-eabi, armv7r-none-eabihf, armv8r-none-eabihf, loongarch64-unknown-none,
loongarch64-unknown-none-softfloat, nvptx64-nvidia-cuda, riscv32i-unknown-none-elf, riscv32im-unknown-none-elf, riscv32imac-unknown-none-elf, riscv32imafc-unknown-none-elf, riscv32imc-unknown-none-elf, riscv64gc-unknown-none-elf, riscv64imac-unknown-none-elf, s390x-unknown-none-softfloat, thumbv6m-none-eabi, thumbv7a-none-eabi, thumbv7a-none-eabihf, thumbv7em-none-eabi, thumbv7em-none-eabihf, thumbv7m-none-eabi, thumbv7r-none-eabi, thumbv7r-none-eabihf, thumbv8m.base-none-eabi, thumbv8m.main-none-eabi, thumbv8m.main-none-eabihf, thumbv8r-none-eabihf, wasm32-unknown-unknown, wasm32v1-none, x86_64-unknown-none

cc #154517

On some platforms, it looks like these are not currently Send/Sync. We
have a negative impl in env/common.rs. This is a breaking change on a
bunch of targets, but it makes it less likely that someone
unintentionally/accidentally depends on this. This is a potentially
partial list but should be fairly complete:

aarch64-unknown-none, aarch64-unknown-none-softfloat, armv7a-none-eabi,
armv7a-none-eabihf, armv7r-none-eabi, armv7r-none-eabihf,
armv8r-none-eabihf, loongarch64-unknown-none,
loongarch64-unknown-none-softfloat, nvptx64-nvidia-cuda,
riscv32i-unknown-none-elf, riscv32im-unknown-none-elf,
riscv32imac-unknown-none-elf, riscv32imafc-unknown-none-elf,
riscv32imc-unknown-none-elf, riscv64gc-unknown-none-elf,
riscv64imac-unknown-none-elf, s390x-unknown-none-softfloat,
thumbv6m-none-eabi, thumbv7a-none-eabi, thumbv7a-none-eabihf,
thumbv7em-none-eabi, thumbv7em-none-eabihf, thumbv7m-none-eabi,
thumbv7r-none-eabi, thumbv7r-none-eabihf, thumbv8m.base-none-eabi,
thumbv8m.main-none-eabi, thumbv8m.main-none-eabihf,
thumbv8r-none-eabihf, wasm32-unknown-unknown, wasm32v1-none,
x86_64-unknown-none
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 11, 2026
@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 11, 2026
@Mark-Simulacrum Mark-Simulacrum marked this pull request as ready for review April 11, 2026 14:05
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 11, 2026

@Mark-Simulacrum: no appropriate reviewer found, use r? to override

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 11, 2026
@Amanieu
Copy link
Copy Markdown
Member

Amanieu commented Apr 14, 2026

@rfcbot merge libs-api

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

rust-rfcbot commented Apr 14, 2026

Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Apr 14, 2026
@Mark-Simulacrum
Copy link
Copy Markdown
Member Author

Just to clarify @nia-e since I see in the meeting notes, in case it affects anyone's FCP box:

Nia: This one is trickier because it's removing a negative impl.

This is not removing a negative impl, it's adding that negative impl to all targets by moving it out of sys/ and into the public type's API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants