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 10 pull requests #126979

Merged
merged 24 commits into from
Jun 26, 2024
Merged

Rollup of 10 pull requests #126979

merged 24 commits into from
Jun 26, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

surechen and others added 24 commits June 25, 2024 10:00
Make it easy for developers to understand why the binop cannot be applied.

fixes rust-lang#125631
The optimization only makes sense for non-drop elements anyway.
Use the default implementation for items that are Drop instead.

It also simplifies the implementation.
previously next_chunk would forget items rejected by the filter
Mainly because I encountered the following error, and we have no reason to prevent our upgrade.

```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
This behaviour is the source of the following dependency conflicts.
virtualenv 20.25.3 requires platformdirs<5,>=3.9.1, but you have platformdirs 3.6.0 which is incompatible.
```
It currently goes one token too far.

Example: line 259 of `tests/ui/abi/compatibility.rs`:
```
test_abi_compatible!(fn_fn, fn(), fn(i32) -> i32);
```
This commit changes the span for the second element from `fn(),` to
`fn()`, i.e. removes the extraneous comma.
…pan, r=compiler-errors

Fix a span in `parse_ty_bare_fn`.

It currently goes one token too far.

Example: line 259 of `tests/ui/abi/compatibility.rs`:
```
test_abi_compatible!(fn_fn, fn(), fn(i32) -> i32);
```
This commit changes the span for the second element from `fn(),` to `fn()`, i.e. removes the extraneous comma.

This doesn't affect any tests. I found it while debugging some other code. Not a big deal but an easy fix so I figure it worth doing.

r? ``@spastorino``
Rename `tcx` to `cx` in new solver generic code

self-explanatory, should be last major churn-y rename

r? lcnr
…cuviper

fix Drop items getting leaked in Filter::next_chunk

The optimization only makes sense for non-drop elements anyway. Use the default implementation for items that are Drop instead.

It also simplifies the implementation.

fixes rust-lang#126872
tracking issue rust-lang#98326
…rors

Change E0369 to give note informations for foreign items.

Change E0369 to give note informations for foreign items.
Make it easy for developers to understand why the binop cannot be applied.

fixes rust-lang#125631
…errors

miri: make sure we can find link_section statics even for the local crate

Miri needs some way to iterate all the exported functions and "used" statics of all crates. For dependency crates, this already works fine since we can overwrite the query resonsible for computing `exported_symbols`, but it turns out for local binary crates this does not work: for binaries, `reachable_set` skips a lot of its logic and only checks `contains_extern_indicator()` and `RUSTC_STD_INTERNAL_SYMBOL`. Other flags like `CodegenFnAttrFlags::USED` are entirely ignored.

This PR proposes to use the same check, `has_custom_linkage`, in binaries that we already use to drive the main workqueue of the reachability recursive traversal. I have no idea why binaries used a slightly different check that ignores `USED` -- was that deliberate or does it just not matter most of the time?
…rrors

resolve: Tweak some naming around import ambiguities
Migrate `lto-empty`, `invalid-so` and `issue-20626` `run-make` tests to rmake.rs

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
Don't ICE during RPITIT refinement checking for resolution errors after normalization

rust-lang#126670 shows a case where resolution errors after normalization can happen during RPITIT refinement checking. Our tests didn't reach this path before, and we explicitly ICEd until we had a test. We can now delay a bug since we're sure it is reachable and have the test from the isue.

The comment I added likely still needs more expert wordsmithing.

r? ``@compiler-errors`` who's making me work during vacation (j/k).
Fixes rust-lang#126670
Bump black, ruff and platformdirs

Mainly because I encountered the following error, and we have no reason to prevent our upgrade.

```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
This behaviour is the source of the following dependency conflicts.
virtualenv 20.25.3 requires platformdirs<5,>=3.9.1, but you have platformdirs 3.6.0 which is incompatible.
```

r? `@Kobzol`
…e-suggestion-error, r=spastorino

Fix bad replacement for unsafe extern block suggestion

Fixes rust-lang#126756

r? ``@spastorino``

link rust-lang#123743
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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. labels Jun 26, 2024
@rustbot rustbot added WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jun 26, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jun 26, 2024

📌 Commit b272086 has been approved by matthiaskrgr

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 Jun 26, 2024
@bors
Copy link
Contributor

bors commented Jun 26, 2024

⌛ Testing commit b272086 with merge 7731802...

@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #126979!

Tested on commit 7731802.
Direct link to PR: #126979

💔 reference on windows: test-pass → test-fail (cc @matthewjasper @Havvy @ehuss).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jun 26, 2024
Tested on commit rust-lang/rust@7731802.
Direct link to PR: <rust-lang/rust#126979>

💔 reference on windows: test-pass → test-fail (cc @matthewjasper @Havvy @ehuss).
@bors
Copy link
Contributor

bors commented Jun 26, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 26, 2024
@bors bors merged commit 7731802 into rust-lang:master Jun 26, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 26, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#126724 Fix a span in parse_ty_bare_fn. 94a5ffd031a61553b2e153735f9179aa60e5a479 (link)
#126812 Rename tcx to cx in new solver generic code 5fa7afeb79a31ab1fa59a43ec2d7cf16ba652fc0 (link)
#126879 fix Drop items getting leaked in Filter::next_chunk 1ed9ec1c7ffa6c92024594a5797f854b570b7f39 (link)
#126925 Change E0369 to give note informations for foreign items. 760a68bc69c37534736d8fa925c445d91e098209 (link)
#126938 miri: make sure we can find link_section statics even for t… da997b08dc6bcf6e355212465ea050fa36b0cd49 (link)
#126954 resolve: Tweak some naming around import ambiguities 8f77d257b42ba6f79b5bfa92589ad13c0d402d3d (link)
#126964 Migrate lto-empty, invalid-so and issue-20626 `run-ma… 014d66d87d9f5a7b32d966fcbdb4342114265739 (link)
#126968 Don't ICE during RPITIT refinement checking for resolution … a2a8312ef58c83b521e3ee83799d686378f97c07 (link)
#126971 Bump black, ruff and platformdirs 4923676cfc32dd8146d15a48374fcbec82252434 (link)
#126973 Fix bad replacement for unsafe extern block suggestion 2e21862ca05ca714164872494dba6e5658d0bd8b (link)

previous master: a299aa5df7

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7731802): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -4.4%)

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)
-4.4% [-4.4%, -4.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.4% [-4.4%, -4.4%] 1

Cycles

Results (secondary -3.4%)

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)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 693.722s -> 694.92s (0.17%)
Artifact size: 326.71 MiB -> 326.70 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-fdqledz branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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. 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.