rust-lang / rust-lang/rust

Audit usages of `std::env::*_var` in the compiler

Open
#130,672 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-cleanup T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

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.

https://github.com/rust-lang/rust/blob/28364822410af31bba5c8adac19cbbfcb9b48717/compiler/rustc_llvm/build.rs#L54

https://github.com/rust-lang/rust/blob/28364822410af31bba5c8adac19cbbfcb9b48717/compiler/rustc_feature/src/tests.rs#L6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read compiler/rustc_llvm/build.rs around line 54 and compiler/rustc_feature/src/tests.rs around line 6, then audit the referenced std::env::*_var calls and their surrounding assumptions. Confirm appropriate handling for each call and remove the FIXME(edition_2024) markers once both sites are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.