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 9 pull requests #127174

Merged
merged 21 commits into from
Jun 30, 2024
Merged

Rollup of 9 pull requests #127174

merged 21 commits into from
Jun 30, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

betelgeuse and others added 21 commits June 24, 2024 11:23
There is no idx in the function signature.
As the comment says, this lint "is mostly historical, and not
particularly useful". It's not worth keeping it around.
The docs for the LoongArch targets are a bit dated since their
introduction, and the prose has some room for improvement as well.
Streamline a bit, referring to the neighboring targets' docs, and
provide up-to-date information as much as I can come up with.
the `expose_provenance` method does not require `T: Sized`
The new enum `DeclareLetBindings` has three variants:
- `Yes`: Declare `let` bindings as normal, for `if` conditions.
- `No`: Don't declare bindings, for match guards and let-else.
- `LetNotPermitted`: Assert that `let` expressions should not occur.
The previous boolean used `true` to indicate that storage-live should _not_ be
emitted, so all occurrences of `Yes` and `No` should be the logical opposite of
the previous value.
These particular callers don't actually use the returned macro information, so
they can use a simpler span-unexpansion function that doesn't return it.
compiler should not suggest nonsensical signatures, original suggestion was

error[E0308]: mismatched types
 --> src/lib.rs:3:31
  |
3 | fn select<F, I>(filter: F) -> Select<F, I> {
  |    ------                     ^^^^^^^^^^^^ expected `Select<F, I>`, found `()`
  |    |
  |    implicitly returns `()` as its body has no tail or `return` expression
  |
  = note: expected struct `Select<F, I>`
          found unit type `()`

error[E0282]: type annotations needed for `Select<{closure@src/lib.rs:8:22: 8:25}, I>`
 --> src/lib.rs:8:9
  |
8 |     let lit = select(|x| match x {
  |         ^^^
  |
help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified
  |
8 |     let lit: Select<{closure@src/lib.rs:8:22: 8:25}, I> = select(|x| match x {
  |            ++++++++++++++++++++++++++++++++++++++++++++

Some errors have detailed explanations: E0282, E0308.
For more information about an error, try `rustc --explain E0282`.
…r=lcnr

Remove the `box_pointers` lint.

As the comment says, this lint "is mostly historical, and not particularly useful". It's not worth keeping it around.

r? ``@estebank``
…umentation, r=Amanieu

Fix simd_gather documentation

There is no idx in the function signature.
Replace some magic booleans in match-lowering with enums

This PR takes some boolean arguments used by the match-lowering code, and replaces them with dedicated enums that more clearly express their effect, while also making it much easier to find how each value is ultimately used.
Update test comment

r? `@camelid`

Rewrote this comment since it mixed up a/b in one place and was generally a bit confusing
…eb,heiher

Update the LoongArch target documentation

The docs for the LoongArch targets are a bit dated since their introduction, and the prose has some room for improvement as well. Streamline a bit, referring to the neighboring targets' docs, and provide up-to-date information as much as I can come up with.

cc fellow target maintainer `@heiher` for review of target-specific bits
…trieb

small correction to fmt::Pointer impl

~~The `addr` method does not require `T: Sized`, and is preferred for use over `expose_provenance`.~~
`expose_provenance` does not require `T: Sized`.
coverage: Avoid getting extra unexpansion info when we don't need it

Several callers of `unexpand_into_body_span_with_visible_macro` would immediately discard the additional macro-related information, which is wasteful. We can avoid this by having them instead call a simpler method that just returns the span they care about.

This PR also moves the relevant functions out of `coverage::spans::from_mir` and into a new submodule `coverage::unexpand`, so that calling them from `coverage::mappings` is less awkward.

There should be no actual changes to coverage-instrumentation output, as demonstrated by the absence of test updates.
Add a regression test for rust-lang#123630

Fixes rust-lang#123630

compiler should not suggest nonsensical signatures, original suggestion was

```
error[E0308]: mismatched types
 --> src/lib.rs:3:31
  |
3 | fn select<F, I>(filter: F) -> Select<F, I> {
  |    ------                     ^^^^^^^^^^^^ expected `Select<F, I>`, found `()`
  |    |
  |    implicitly returns `()` as its body has no tail or `return` expression
  |
  = note: expected struct `Select<F, I>`
          found unit type `()`

error[E0282]: type annotations needed for `Select<{closure@src/lib.rs:8:22: 8:25}, I>`
 --> src/lib.rs:8:9
  |
8 |     let lit = select(|x| match x {
  |         ^^^
  |
help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified
  |
8 |     let lit: Select<{closure@src/lib.rs:8:22: 8:25}, I> = select(|x| match x {
  |            ++++++++++++++++++++++++++++++++++++++++++++

Some errors have detailed explanations: E0282, E0308. For more information about an error, try `rustc --explain E0282`.
```
…gs, r=Kobzol

Improve `run-make-support` library `args` API

It allows to pass both `Vec` and slices, which makes it much better (for me at least 😉).

r? ``@Kobzol``
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 30, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Jun 30, 2024

📌 Commit 4037197 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 30, 2024
@bors
Copy link
Contributor

bors commented Jun 30, 2024

⌛ Testing commit 4037197 with merge 804746e...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#126018 (Remove the `box_pointers` lint.)
 - rust-lang#126895 (Fix simd_gather documentation)
 - rust-lang#126981 (Replace some magic booleans in match-lowering with enums)
 - rust-lang#127038 (Update test comment)
 - rust-lang#127053 (Update the LoongArch target documentation)
 - rust-lang#127069 (small correction to fmt::Pointer impl)
 - rust-lang#127157 (coverage: Avoid getting extra unexpansion info when we don't need it)
 - rust-lang#127160 (Add a regression test for rust-lang#123630)
 - rust-lang#127161 (Improve `run-make-support` library `args` API)

r? `@ghost`
`@rustbot` modify labels: rollup
@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)
##[endgroup]
==> Downloading https://ghcr.io/v2/homebrew/core/ninja/manifests/1.12.1
==> Fetching ninja
==> Downloading https://ghcr.io/v2/homebrew/core/ninja/blobs/sha256:4cda186dde7fff9284bc64d2469faf3a6af148e656f9ee9c27d731d1e02bb637
curl: (6) Could not resolve host: pkg-containers.githubusercontent.com
curl: (6) Could not resolve host: pkg-containers.githubusercontent.com
curl: (6) Could not resolve host: pkg-containers.githubusercontent.com
curl: (6) Could not resolve host: pkg-containers.githubusercontent.com
Error: ninja: Failed to download resource "ninja"
Download failed: https://ghcr.io/v2/homebrew/core/ninja/blobs/sha256:4cda186dde7fff9284bc64d2469faf3a6af148e656f9ee9c27d731d1e02bb637
##[error]ninja: Failed to download resource "ninja"
failed: https://ghcr.io/v2/homebrew/core/ninja/blobs/sha256:4cda186dde7fff9284bc64d2469faf3a6af148e656f9ee9c27d731d1e02bb637
##[error]Process completed with exit code 1.
[command]/usr/local/bin/git version
git version 2.45.2
Copying '/Users/runner/.gitconfig' to '/Users/runner/work/_temp/687eee72-d2bf-4ddc-894b-d6d60386cb8a/.gitconfig'
Temporarily overriding HOME='/Users/runner/work/_temp/687eee72-d2bf-4ddc-894b-d6d60386cb8a' before making global git config changes

@bors
Copy link
Contributor

bors commented Jun 30, 2024

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

bors commented Jun 30, 2024

⌛ Testing commit 4037197 with merge 6868c83...

@bors
Copy link
Contributor

bors commented Jun 30, 2024

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#126018 Remove the box_pointers lint. a9c0b1b7c5c95caea4c2224200d83371db1b8080 (link)
#126895 Fix simd_gather documentation 96b20c5ee952611ee4a50cea3ab743348941b7a4 (link)
#126981 Replace some magic booleans in match-lowering with enums ed2ffd13280aee44aa7e66462528c61a37ee6f7a (link)
#127038 Update test comment 426bdb57189086631260cb6c5a70c297a0c2dd5e (link)
#127053 Update the LoongArch target documentation 2925a4753453b5347360f699a26e65eadd492671 (link)
#127069 small correction to fmt::Pointer impl a162afa1da1a33f07a10eefd494d3c3a7fec53c7 (link)
#127157 coverage: Avoid getting extra unexpansion info when we don'… 558013293324210c6c7e058c9d43d904fcf8843b (link)
#127160 Add a regression test for #123630 51a466427964a5dcd1ac97cc7f24ae617e1d2198 (link)
#127161 Improve run-make-support library args API 5096860c65a2bd7e2526685283ee25b0dd258561 (link)

previous master: ef3d6fd700

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 (6868c83): 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.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.4% [-1.1%, -0.2%] 46
Improvements ✅
(secondary)
-1.3% [-2.9%, -0.2%] 36
All ❌✅ (primary) -0.4% [-1.1%, -0.2%] 46

Max RSS (memory usage)

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

Cycles

Results (primary 2.0%, secondary 2.0%)

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.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
2.4% [1.8%, 2.8%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Binary size

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

Bootstrap: 697.442s -> 697.702s (0.04%)
Artifact size: 324.64 MiB -> 324.56 MiB (-0.02%)

@matthiaskrgr matthiaskrgr deleted the rollup-q87j6cn branch September 1, 2024 17:36
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 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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.