-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rollup of 4 pull requests #135438
Rollup of 4 pull requests #135438
Conversation
…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.
I am working on fs support for UEFI [0], which similar to windows has prefix components, but is not quite same as Windows. It also seems that Prefix is tied closely to Windows and cannot really be extended [1]. This PR just tries to remove coupling between Prefix and absolute path checking to allow platforms to provide there own implementation to check if a path is absolute or not. I am not sure if any platform other than windows currently uses Prefix, so I have kept the path.prefix().is_some() check in most cases. [0]: rust-lang#135368 [1]: rust-lang#52331 (comment) Signed-off-by: Ayush Singh <ayush@beagleboard.org>
replace copypasted ModuleLlvm::parse replaced code same as in https://github.com/rust-lang/rust/blob/bd36e69d2533ee750e2d805915b8ca88d2825e0f/compiler/rustc_codegen_llvm/src/lib.rs#L426-L445 except before error message was emitted via `write::llvm_err`, which returned other error kind, but it still ok?
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)`
…ss35 path: Move is_absolute check to sys::path I am working on fs support for UEFI [0], which similar to windows has prefix components, but is not quite same as Windows. It also seems that Prefix is tied closely to Windows and cannot really be extended [1]. This PR just tries to remove coupling between Prefix and absolute path checking to allow platforms to provide there own implementation to check if a path is absolute or not. I am not sure if any platform other than windows currently uses Prefix, so I have kept the path.prefix().is_some() check in most cases. [0]: rust-lang#135368 [1]: rust-lang#52331 (comment)
…y, r=lcnr Assert that `Instance::try_resolve` is only used on body-like things `Instance::resolve` is not set up to resolve items that are not body-like things. The logic in `resolve_associated_item` very much encodes this assumption: https://github.com/rust-lang/rust/blob/e7ad3ae331bf2716389c10e01612e201a7f98c8d/compiler/rustc_ty_utils/src/instance.rs#L96-L386 However, some diagnostics were using `Instance::resolve` on an associated type, and it was simply a lucky coicidence that nothing went wrong. This PR adds an assertion to make sure we won't do this again in the future, and fixes two callsites: 1. `call_kind` which returns a `CallKind` enum to categorize what a call in MIR comes from, and was using `Instance::resolve` to point at the associated type `Deref::Target` for a specific self ty. 2. `MirBorrowckCtxt::explain_deref_coercion`, which was doing the same thing. The logic was replaced with `specialization_graph::assoc_def`, which is the proper way of fetching the right `AssocItem` for a given impl. r? `@lcnr` or re-roll :)
@bors r+ rollup=never p=4 |
…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
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors try |
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
☀️ Try build successful - checks-actions |
@bors r+ rollup=never p=1 |
💡 This pull request was already approved, no need to approve it again.
|
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 2ae9916816 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (1ab85fb): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (secondary 0.9%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 763.959s -> 765.313s (0.18%) |
@rust-timer build cbba621 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (cbba621): comparison URL. Overall result: ❌ regressions - please read the text belowInstruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (secondary 1.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 1.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 763.959s -> 764.753s (0.10%) |
@compiler-errors FYI it seems like #135426 was responsible for the perf regressions here. I'm not sure it's worth investigation given that it had limited impacts on real world benchmarks. |
Successful merges:
std::env::set_var()
inUnstableFeatures
tests #135245 (rustc_feature: Avoid unsafestd::env::set_var()
inUnstableFeatures
tests)Instance::try_resolve
is only used on body-like things #135426 (Assert thatInstance::try_resolve
is only used on body-like things)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup
try-job: x86_64-mingw-1