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

Audit usages of std::env::*_var in the compiler #130672

Open
compiler-errors opened this issue Sep 21, 2024 · 1 comment
Open

Audit usages of std::env::*_var in the compiler #130672

compiler-errors opened this issue Sep 21, 2024 · 1 comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@compiler-errors
Copy link
Member

compiler-errors commented Sep 21, 2024

We have a couple instances of env::*_var which are now unsafe in edition 2024. They're not necessarily obviously safe, so I've left them with a FIXME(edition_2024) -- we should fix them eventually.

env::set_var(&key, env);

std::env::set_var("RUSTC_BOOTSTRAP", env);

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 21, 2024
@bjorn3
Copy link
Member

bjorn3 commented Sep 21, 2024

The rustc_llvm/build.rs one should be safe. We don't spawn any threads inside the build script.

@lolbinarycat lolbinarycat added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 21, 2024
@jieyouxu jieyouxu added C-bug Category: This is a bug. A-edition-2024 Area: The 2024 edition and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-edition-2024 Area: The 2024 edition labels Sep 22, 2024
@Enselic Enselic added C-cleanup Category: PRs that clean code up or issues documenting cleanup. and removed C-bug Category: This is a bug. labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants