Skip to content

Rollup of 11 pull requests #122713

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 31 commits into from
Mar 18, 2024
Merged

Rollup of 11 pull requests #122713

merged 31 commits into from
Mar 18, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

clubby789 and others added 30 commits March 6, 2024 12:01
```
error: `S2<'_>` is forbidden as the type of a const generic parameter
  --> $DIR/lifetime-in-const-param.rs:5:23
   |
LL | struct S<'a, const N: S2>(&'a ());
   |                       ^^
   |
   = note: the only supported types are integers, `bool` and `char`
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
   |
LL + #![feature(adt_const_params)]
   |
```

Fix rust-lang#55941.
Co-authored-by: Mateusz Mikuła <mati865@gmail.com>
…y-generic-tys, r=compiler-errors

Reject overly generic assoc const binding types

Split off from rust-lang#119385 to make rust-lang#119385 easier to review.

---

In the *instantiated* type of assoc const bindings

1. reject **early-bound generic params**
   * Provide a rich error message instead of ICE'ing ([rust-lang#108271](rust-lang#108271)).
   * This is a temporary and semi-artificial restriction until the arrival of *generic const generics*.
   * It's quite possible that rustc could already perfectly support this subset of generic const generics if we just removed some checks (some `.no_bound_vars().expect(…)`) but even if that was the case, I'd rather gate it behind a new feature flag. Reporting an error instead of ICE'ing is a good first step towards an eventual feature gate error.
2. reject **escaping late-bound generic params**
   * They lead to ICEs before & I'm pretty sure that they remain incorrect even in a world with *generic const generics*

---

Together with rust-lang#118668 & rust-lang#119385, this supersedes rust-lang#118360.
Fixes rust-lang#108271.
…ler-errors

never patterns: suggest `!` patterns on non-exhaustive matches

When a match is non-exhaustive we now suggest never patterns whenever it makes sense.

r? ``@compiler-errors``
Provide structured suggestion for `#![feature(foo)]`

```
error: `S2<'_>` is forbidden as the type of a const generic parameter
  --> $DIR/lifetime-in-const-param.rs:5:23
   |
LL | struct S<'a, const N: S2>(&'a ());
   |                       ^^
   |
   = note: the only supported types are integers, `bool` and `char`
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
   |
LL + #![feature(adt_const_params)]
   |
```

Fix rust-lang#55941.
…p_remove, r=Amanieu

Improve wording of `Vec::swap_remove`

This improve the wording for  `Vec::swap_remove`.
core: document default attribute stabilization

As of now, the first release which stabilized the `#[default]` macro for the deriving the `Default` trait for enus is not documented.
I have had to search the [`RELEASES.md`](https://github.com/rust-lang/rust/blob/master/RELEASES.md) when making sure my code would be accepted by an older Rust compiler.

I just added a line in the doc comment since, as far as I know, there's no option to pass to the `#[stable()]` attribute.

I am open to improvements in the wording.
…ls, r=compiler-errors

`NormalizesTo`: return nested goals to caller

Fixes the regression of `paperclip-core`. see https://hackmd.io/IsVAafiOTAaPIFcUxRJufw for more details.

r? ```@compiler-errors```
…Gomez

Fix heading anchors in doc pages.

This fixes the heading anchors on the standalone doc pages (the index, releases, etc.) so that the § symbol is only shown when the user hovers over the heading. This was changed in rust-lang#117662, but this CSS was not updated.
…jubilee

Remove redundant files, rename base riscv32 file

Fixes a mistake I made in rust-lang#117874.
@rustbot rustbot added 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 18, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Collaborator

bors commented Mar 18, 2024

📌 Commit 3c3b398 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 Mar 18, 2024
@bors
Copy link
Collaborator

bors commented Mar 18, 2024

⌛ Testing commit 3c3b398 with merge 3c85e56...

@bors
Copy link
Collaborator

bors commented Mar 18, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 18, 2024
@bors bors merged commit 3c85e56 into rust-lang:master Mar 18, 2024
@rustbot rustbot added this to the 1.79.0 milestone Mar 18, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#121258 Reject overly generic assoc const binding types 72209e1461e28d1f549f3eb446d3167402ff2e69 (link)
#121823 never patterns: suggest ! patterns on non-exhaustive matc… 5500cd0ebedbf66b99c18dbb332c7c8fcb276d5c (link)
#122060 Stabilize imported_main 083aca8c3bcbbbaecf1da571b7ef1b082957e07b (link)
#122158 Provide structured suggestion for #![feature(foo)] f69f6e0127add2bbae765364fb1036828a72a581 (link)
#122642 Improve wording of Vec::swap_remove d455a92d77bfc4f44a41abc649da420a783cc9d5 (link)
#122675 core: document default attribute stabilization ba9fa5ccd0b7f35fc7bd6bcf15f60f4c44c461fe (link)
#122687 NormalizesTo: return nested goals to caller d291299ad138e2704f05cc0c981a217cd5cfedb3 (link)
#122693 Fix heading anchors in doc pages. d16d44f1e1bbd5f293e6f3b6f2d642e2e82c0e0c (link)
#122699 Fix a typo in the 1.77.0 relnotes 43de8687da7f55a684e11b7ebe4990ca6374aebe (link)
#122700 Remove redundant files, rename base riscv32 file 1db4e968b9389ac0b6dcfee4d90fcb3505cda442 (link)
#122701 Detect allocator for box in must_not_suspend lint 0f2eba6e82f7791032e81e9f296dd5fe6ce605ad (link)

previous master: d31b6fb8c0

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 (3c85e56): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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)
1.0% [0.5%, 1.4%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.9%, -0.4%] 7
All ❌✅ (primary) 1.0% [0.5%, 1.4%] 3

Max RSS (memory usage)

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

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

Binary size

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

Bootstrap: 667.419s -> 669.42s (0.30%)
Artifact size: 312.79 MiB -> 312.82 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 19, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Mar 19, 2024

The regression was in check_match query, so it might have been this:

@rust-timer build 5500cd0

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5500cd0): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

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)
1.0% [0.5%, 1.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [0.5%, 1.3%] 3

Max RSS (memory usage)

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

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

Binary size

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

Bootstrap: 667.419s -> 668.758s (0.20%)
Artifact size: 312.79 MiB -> 312.79 MiB (0.00%)

@Kobzol
Copy link
Contributor

Kobzol commented Mar 19, 2024

CC @Nadrieril just to let you know that #121823 was a small regression for the cranelift-codegen benchmark. But other than that, I don't think that we need to delve deeper.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Mar 19, 2024
@Nadrieril
Copy link
Member

Ty!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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. 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.