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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. 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.

2 participants