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 5 pull requests #130519

Merged
merged 20 commits into from
Sep 18, 2024
Merged

Rollup of 5 pull requests #130519

merged 20 commits into from
Sep 18, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nnethercote and others added 20 commits September 17, 2024 08:12
It only needs `Self::Value` and `Self::Type`, so it can be a subtrait of
`BackendTypes`. That is a smaller and simpler trait than `HasCodegen`
(which includes `BackendTypes` and a lot more).
It has `Backend` and `Deref` boudns, plus an associated type
`CodegenCx`, and it has a single use. This commit "inlines" it into
`BuilderMethods`, which makes the complicated backend trait situation a
little simpler.
It's a trait that aggregates five other traits. But consider the places
that use it.
- `BuilderMethods`: requires three of the five traits.
- `CodegenMethods`: requires zero(!) of the five traits.
- `BaseTypeMethods`: requires two of the five traits.
- `LayoutTypeMethods`: requires three of the five traits.
- `TypeMembershipMethods`: requires one of the five traits.

This commit just removes it, which makes everything simpler.
They both are part of `BuilderMethods`, and so should have `Builder` in
their name like all the other traits in `BuilderMethods`.
Some of these are pulled in indirectly, e.g. `MiscMethods` via
`TypeMethods`.
Specifically, put them where they are genuinely required, i.e. the
outermost place they can be.
Supertraits of `BuilderMethods` are all called `XyzBuilderMethods`.
Supertraits of `CodegenMethods` are all called `XyzMethods`. This commit
changes the latter to `XyzCodegenMethods`, for consistency.
This avoids some repetitive boilerplate code.
For example, the two following statements are desugared into a block
whose `LetStmt` source is `AssignDesugar`:

```rust
_ = ignoring_some_result();
(a, b) = (b, a);
```
…, r=bjorn3

Cleanup codegen traits

The traits governing codegen are quite complicated and hard to follow. This PR cleans them up a bit.

r? `@bjorn3`
Add zlib to musl dist image so rust-lld will support zlib compression for debug info there.

Fixes rust-lang#130063.

r? `@Kobzol`
…eyouxu

Improve handling of raw-idents in check-cfg

This PR improves the handling of raw-idents in the check-cfg diagnostics.

In particular the list of expected names and the suggestion now correctly take into account the "keyword-ness" of the ident, and correctly prefix the ident with `r#` when necessary.

`@rustbot` labels +F-check-cfg
llvm-wrapper: adapt for LLVM API changes, second try

This is a re-work of rust-lang#129749 after LLVM brought back the APIs used by rust.

No functional changes intended.

`@rustbot` label: +llvm-main
r? `@nikic`
cc: `@tmandry`
…esugar, r=compiler-errors

doc: the source of `LetStmt` can also be `AssignDesugar`

For example, the two following statements are desugared into a block whose `LetStmt` source is `AssignDesugar`:

```rust
_ = ignoring_some_result();
(a, b) = (b, a);
```
@rustbot rustbot added 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 18, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Sep 18, 2024

📌 Commit c0951bb 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 Sep 18, 2024
@bors
Copy link
Contributor

bors commented Sep 18, 2024

⌛ Testing commit c0951bb with merge f79a912...

@bors
Copy link
Contributor

bors commented Sep 18, 2024

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#130457 Cleanup codegen traits 7053f2ec770b893d798b816def6b81e280d4a6f1 (link)
#130471 Add zlib to musl dist image so rust-lld will support zlib c… 3de2e2133d5a8bec3ddc3a0bba299e168313a8e7 (link)
#130507 Improve handling of raw-idents in check-cfg 28c28f8d165241897c141964cfa249e4f779276b (link)
#130509 llvm-wrapper: adapt for LLVM API changes, second try 4d172b3ca117b2109c4a1074204d920353588b28 (link)
#130510 doc: the source of LetStmt can also be AssignDesugar 0c9cd665229a69418ac1d6578c520e03be82ef67 (link)

previous master: 7fc70f870a

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 (f79a912): 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 0.2%, secondary 2.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)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 2
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-2.0%, 2.4%] 2

Cycles

Results (secondary 0.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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [2.1%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 768.056s -> 769.338s (0.17%)
Artifact size: 341.27 MiB -> 341.29 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants