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 3 pull requests #124386

Merged
merged 11 commits into from
Apr 25, 2024
Merged

Rollup of 3 pull requests #124386

merged 11 commits into from
Apr 25, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 11 commits April 25, 2024 11:49
```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
  --> $DIR/suggest-split-at-mut.rs:13:18
   |
LL |     let a = &mut foo[..2];
   |                  --- first mutable borrow occurs here
LL |     let b = &mut foo[2..];
   |                  ^^^ second mutable borrow occurs here
LL |     a[0] = 5;
   |     ---- first borrow later used here
   |
   = help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
```

Address most of rust-lang#58792.

For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
Emit suggestion when encountering

```rust
let a = &mut foo[0];
let b = &foo[1];
a.use_mut();
```
Detect borrow error involving sub-slices and suggest `split_at_mut`

```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
  --> $DIR/suggest-split-at-mut.rs:13:18
   |
LL |     let a = &mut foo[..2];
   |                  --- first mutable borrow occurs here
LL |     let b = &mut foo[2..];
   |                  ^^^ second mutable borrow occurs here
LL |     a[0] = 5;
   |     ---- first borrow later used here
   |
   = help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
```

Address most of rust-lang#58792.

For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
… r=lcnr

Don't ICE when `codegen_select_candidate` returns ambiguity in new solver

Because we merge identical candidates, we may have >1 impl candidate to in `codegen_select_error` but *not* have a trait error.

r? lcnr
…strieb

`Range` iteration specialization: remove trivial bounds

These bounds on impl items are trivially true and never checked by a caller. They end up shadowing the actual impls, currently preventing normalization in the new solver. While we may have to fix the underlying issue in the new solver at some point, for now this is an easy way to get us closer to compiling core with `-Znext-solver`.

r? `@Nilstrieb`
@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. rollup A PR which is a rollup labels Apr 25, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=3

@bors
Copy link
Contributor

bors commented Apr 25, 2024

📌 Commit 3c0c5b4 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 Apr 25, 2024
@bors
Copy link
Contributor

bors commented Apr 25, 2024

⌛ Testing commit 3c0c5b4 with merge 3a36386...

@bors
Copy link
Contributor

bors commented Apr 25, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 25, 2024
@bors bors merged commit 3a36386 into rust-lang:master Apr 25, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 25, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#124313 Detect borrow error involving sub-slices and suggest `split… 10e7ad8cb4eabb88184153eb1bc8a755070bb457 (link)
#124374 Don't ICE when codegen_select_candidate returns ambiguity… 6f56a0c16e624714126debc772248c5f93788126 (link)
#124380 Range iteration specialization: remove trivial bounds 4218dee781ee680a627b3155d22a12a0b7cc732c (link)

previous master: 38dd569150

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

Overall result: ❌ regressions - 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.9% [0.2%, 1.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 671.322s -> 671.645s (0.05%)
Artifact size: 315.99 MiB -> 315.99 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-0a6yr00 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
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.

7 participants