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

Rollup of 8 pull requests #108920

Merged
merged 19 commits into from
Mar 9, 2023
Merged

Rollup of 8 pull requests #108920

merged 19 commits into from
Mar 9, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 19 commits March 4, 2023 23:47
PR 107844 made DropAndReplace unused, let's remove it completely
from the codebase.
Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous

Fixes rust-lang#108721

The problem here is that when we're checking `is_sized_raw` during codegen on some type that has a lot of opaques in it, something emits several nested obligations that are individually ambiguous, but when processed together in a loop then apply modulo regions. Since the `evaluate_predicates_recursively` inner loop doesn't process predicates until they stop changing, we return `EvaluatedToAmbig`, which makes the sized check return false incorrectly. See:

https://github.com/rust-lang/rust/blob/f15f0ea73972786e426732c5b92ba9a904b866c4/compiler/rustc_trait_selection/src/traits/select/mod.rs#L596-L606

... Compared to the analogous loop in the new solver:

https://github.com/rust-lang/rust/blob/f15f0ea73972786e426732c5b92ba9a904b866c4/compiler/rustc_trait_selection/src/solve/mod.rs#L481-L512

To fix this, if we get ambiguous during `pred_known_to_hold_modulo_regions`, just retry the obligation in a fulfillment context.

--

Unfortunately... I don't have a test for this. I've only tested this locally. Pending minimization :/

r? types
…t-release-notes-for-1.41.1-apple32, r=Mark-Simulacrum

1.41.1 supported 32-bit Apple targets

This question was raised by rust-lang#108556.
…oot-var, r=lcnr

Canonicalize root var when making response from new solver

During trait solving, if we equate two inference variables `?0` and `?1` but don't equate them with any rigid types, then `InferCtxt::probe_ty_var` will return `Err` for both of these. The canonicalizer code will then canonicalize the variables independently(!), and the response will not reflect the fact that these two variables have been made equal.

This hinders inference and I also don't think it's sound? I haven't thought too much about it past that, so let's talk about it.

r? ``@lcnr``
…asko

Remove DropAndReplace terminator

rust-lang#107844 made DropAndReplace unused, let's remove it completely from the codebase.
Tweak E0740

Also drive-by suppress E0740 if it's an unresolved type.
…k-Simulacrum

Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap

Downstream forks of the Rust compiler might want to use a custom `libc` to add support for targets that are not yet available upstream. Adding a patch to replace `libc` with a custom one would cause compilation errors though, because Cargo would interpret the custom `libc` as part of the workspace, and apply the check-cfg lints on it.

Since rust-lang/libc#3037, the `libc` build script emits check-cfg flags only when the `LIBC_CHECK_CFG` environment variable is set, so this PR allows the use of custom `libc`s.
…-tester-code, r=notriddle

Improve rustdoc-gui/tester.js code a bit

Just a small clean-up.

r? `@notriddle`
…er-errors

Remove an unused return value in `rustc_hir_typeck`

Unused since rust-lang#89580. Just something I noticed a while ago.

`@rustbot` label C-cleanup
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Mar 8, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Mar 8, 2023

📌 Commit a22c5f9 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 8, 2023
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 8, 2023
@bors
Copy link
Contributor

bors commented Mar 9, 2023

⌛ Testing commit a22c5f9 with merge b44d559be8e301a9881a2569015befa70f79324c...

@bors
Copy link
Contributor

bors commented Mar 9, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 9, 2023
@matthiaskrgr
Copy link
Member Author

@bors retry

@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 Mar 9, 2023
@bors
Copy link
Contributor

bors commented Mar 9, 2023

⌛ Testing commit a22c5f9 with merge 39f2657...

@bors
Copy link
Contributor

bors commented Mar 9, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 39f2657 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 9, 2023
@bors bors merged commit 39f2657 into rust-lang:master Mar 9, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 9, 2023
@rust-timer
Copy link
Collaborator

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (39f2657): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.6% [-2.1%, -0.6%] 3
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-5.4%, -2.5%] 4
All ❌✅ (primary) - - 0

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 10, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous)
 - rust-lang#108759 (1.41.1 supported 32-bit Apple targets)
 - rust-lang#108839 (Canonicalize root var when making response from new solver)
 - rust-lang#108856 (Remove DropAndReplace terminator)
 - rust-lang#108882 (Tweak E0740)
 - rust-lang#108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap)
 - rust-lang#108911 (Improve rustdoc-gui/tester.js code a bit)
 - rust-lang#108916 (Remove an unused return value in `rustc_hir_typeck`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr deleted the rollup-qrr9a0u branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.