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 7 pull requests #124295

Merged
merged 29 commits into from
Apr 23, 2024
Merged

Rollup of 7 pull requests #124295

merged 29 commits into from
Apr 23, 2024

Conversation

fmease
Copy link
Member

@fmease fmease commented Apr 23, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 29 commits March 25, 2024 20:18
This handles using deref patterns to choose the correct match arm. This
does not handle bindings or guards.

Co-authored-by: Deadbeef <ent3rm4n@gmail.com>
This requires nested subdiagnostics.
…tion, r=fmease

Wrap dyn type with parentheses in suggestion

Close rust-lang#120223

Fix wrong suggestion that is grammatically incorrect.
Specifically, I added parentheses to dyn types that need lifetime bound.

```
help: consider adding an explicit lifetime bound
  |
4 |     executor: impl FnOnce(T) -> (dyn Future<Output = ()>) + 'static,
  |                                 +                       +++++++++++
```
…gestion, r=fmease

Suggest using type args directly instead of equality constraint

When type arguments are written erroneously using an equality constraint we suggest specifying them directly without the equality constraint.

Fixes rust-lang#122162

Changes the diagnostic in the issue from:
```rust
error[E0229]: associated type bindings are not allowed here
9 | impl std::cmp::PartialEq<Rhs = T> for S {
  |                          ^^^^^^^ associated type not allowed here
  |
```
to
```rust
error[E0229]: associated type bindings are not allowed here
9 | impl std::cmp::PartialEq<Rhs = T> for S {
  |                          ^^^^^^^ associated type not allowed here
  |
help: to use `T` as a generic argument specify it directly
  |
  |      impl std::cmp::PartialEq<T> for S {
  |                               ~
```
…wjasper

deref patterns: lower deref patterns to MIR

This lowers deref patterns to MIR. This is a bit tricky because this is the first kind of pattern that requires storing a value in a temporary. Thanks to rust-lang#123324 false edges are no longer a problem.

The thing I'm not confident about is the handling of fake borrows. This PR ignores any fake borrows inside a deref pattern. We are guaranteed to at least fake borrow the place of the first pointer value, which could be enough, but I'm not certain.
alloc::Layout: explicitly document size invariant on the type level

rust-lang#95295 added this to the constructor, but it seems worth documenting the type invariant at the type level.
Do `check_coroutine_obligations` once per typeck root

We only need to do `check_coroutine_obligations` once per typeck root, especially since the new solver can't really (easily) associate which obligations correspond to which coroutines.

This requires us to move the checks for sized coroutine fields into `mir_coroutine_witnesses`, but that's fine imo.

r? lcnr
…twco

Allow nesting subdiagnostics in #[derive(Subdiagnostic)]
… r=petrochenkov

Mark `@RUSTC_BUILTIN` search path usage as unstable

Follow up to rust-lang#121843

r? `@petrochenkov`
@rustbot rustbot added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Apr 23, 2024
@rustbot rustbot added 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 23, 2024
@fmease
Copy link
Member Author

fmease commented Apr 23, 2024

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 23, 2024

📌 Commit 5ff1fa9 has been approved by fmease

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 Apr 23, 2024
@bors
Copy link
Contributor

bors commented Apr 23, 2024

⌛ Testing commit 5ff1fa9 with merge c2f2db7...

@bors
Copy link
Contributor

bors commented Apr 23, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing c2f2db7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 23, 2024
@bors bors merged commit c2f2db7 into rust-lang:master Apr 23, 2024
13 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 23, 2024
@fmease fmease deleted the rollup-i3apkc6 branch April 23, 2024 18:23
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#120929 Wrap dyn type with parentheses in suggestion 888a0ad85486645fbbc0a9c52ac98cc8383f4257 (link)
#122591 Suggest using type args directly instead of equality constr… 00ff515058c57d3dc5beae66ebff2ad6bf49e29c (link)
#122598 deref patterns: lower deref patterns to MIR ea0b640a1098f88dc194208099fee68e04388045 (link)
#123048 alloc::Layout: explicitly document size invariant on the ty… 576bea1971749a13c657db6e6d713ff9f8625dd0 (link)
#123993 Do check_coroutine_obligations once per typeck root 8d0d6bfc0e5f8c8e8b226b781ec2d53528810677 (link)
#124218 Allow nesting subdiagnostics in #[derive(Subdiagnostic)] 7a18cc32ecc507783356a05155c242423da18f36 (link)
#124285 Mark @RUSTC_BUILTIN search path usage as unstable c10c5ddca7f3b12c36b9d853cf325d2c3a0813b9 (link)

previous master: cd90d5c035

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

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)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
5.9% [4.9%, 6.8%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [1.2%, 1.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)
2.6% [2.4%, 2.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 674.88s -> 675.427s (0.08%)
Artifact size: 316.16 MiB -> 315.55 MiB (-0.20%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.