mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-27 11:05:06 +00:00
rustc_feature: Avoid unsafe `std::env::set_var()` in `UnstableFeatures` tests
Avoid unsafe `std::env::set_var()` by allowing tests to inject `std::env::var("RUSTC_BOOTSTRAP")` with a `env_var_rustc_bootstrap` parameter.
Part of https://github.com/rust-lang/rust/issues/130672
Discussed at https://github.com/rust-lang/rust/pull/129636#discussion_r1766381501 (CC `@compiler-errors` `@bjorn3)`