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

rustc_feature: Avoid unsafe std::env::set_var() in UnstableFeatures tests #135245

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

Enselic
Copy link
Member

@Enselic Enselic commented Jan 8, 2025

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 #130672

Discussed at #129636 (comment) (CC @compiler-errors @bjorn3)

…s` tests

Avoid unsafe `std::env::set_var()` by allowing tests to inject
`std::env::var("RUSTC_BOOTSTRAP")` with a `env_var_rustc_bootstrap`
parameter.
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2025
@davidtwco
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 13, 2025

📌 Commit 54ce831 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#133752 (replace copypasted ModuleLlvm::parse)
 - rust-lang#135245 (rustc_feature: Avoid unsafe `std::env::set_var()` in `UnstableFeatures` tests)
 - rust-lang#135405 (path: Move is_absolute check to sys::path)
 - rust-lang#135426 (Assert that `Instance::try_resolve` is only used on body-like things)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
Rollup of 4 pull requests

Successful merges:

 - rust-lang#133752 (replace copypasted ModuleLlvm::parse)
 - rust-lang#135245 (rustc_feature: Avoid unsafe `std::env::set_var()` in `UnstableFeatures` tests)
 - rust-lang#135405 (path: Move is_absolute check to sys::path)
 - rust-lang#135426 (Assert that `Instance::try_resolve` is only used on body-like things)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: x86_64-mingw-1
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#133752 (replace copypasted ModuleLlvm::parse)
 - rust-lang#135245 (rustc_feature: Avoid unsafe `std::env::set_var()` in `UnstableFeatures` tests)
 - rust-lang#135405 (path: Move is_absolute check to sys::path)
 - rust-lang#135426 (Assert that `Instance::try_resolve` is only used on body-like things)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: x86_64-mingw-1
@bors bors merged commit 957247d into rust-lang:master Jan 14, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 14, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
Rollup merge of rust-lang#135245 - Enselic:no-set-env, r=davidtwco

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 rust-lang#130672

Discussed at rust-lang#129636 (comment) (CC `@compiler-errors` `@bjorn3)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler 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