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 8 pull requests #123676

Merged
merged 17 commits into from
Apr 9, 2024
Merged

Rollup of 8 pull requests #123676

merged 17 commits into from
Apr 9, 2024

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

stepancheg and others added 17 commits April 5, 2024 19:55
There's PR rust-lang#123184
which avoids allocation for ZST ThinBox.

That PR has an issue with unsoundness with misuse of `MaybeUninit`
(see comments in that PR).

This PR is much simpler implementation which does not have this
problem, but it uses `const_allocate` feature.
We don't need the branch coverage version of this test, but we can recycle is
to make sure that the MC/DC coverage support works as expected.
…ramEnv

not just the ones from the elaborated clauses.
If this leaks in from the environment then it can make tests fail when
they deliberately trigger `WARN` or `ERROR` logging.

Signed-off-by: David Wood <david@davidtw.co>
… r=oli-obk

Do not allocate for ZST ThinBox (attempt 2 using const_allocate)

There's PR rust-lang#123184 which avoids allocation for ZST ThinBox.

That PR has an issue with unsoundness with padding in `MaybeUninit` (see comments in that PR). Also that PR relies on `Freeze` trait.

This PR is much simpler implementation which does not have this problem, but it uses `const_allocate` feature.

`@oli-obk` suggested that `const_allocate` should not be used for that feature. But I like how easy it to do this feature with `const_allocate`. Maybe it's OK to use `const_allocate` while `ThinBox` is unstable? Or, well, we can abandon this PR.

r? `@oli-obk`
Add MC/DC support to coverage test tools

Extracted and squashed from rust-lang#123409 by `@ZhuUx.`

These updates to the coverage test tools can land ahead of the main changes, slightly reducing the size and complexity of that PR.

---

The `coverage-dump` changes aren't directly tested in this PR, but the tests in rust-lang#123409 demonstrate that they do work on real MC/DC coverage output.

`@rustbot` label +A-code-coverage
…m-param-env-clauses, r=GuillaumeGomez

rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv

... not just the elaborated clauses.

Fixes another regression introduced by me in rust-lang#123340, oops!
Fixes rust-lang#123340 (comment), cc ``@tamird.``

An earlier local iteration of branch `rustdoc-simplify-auto-trait-impl-synth` (PR rust-lang#123340) contained a fix for issue rust-lang#111101 before I decided to limit the scope. I must've introduced this bug when manually reverting that part of the code.

r? ``@GuillaumeGomez`` or rustdoc
…=compiler-errors

Split `non_local_definitions` lint tests in separate test files

This PR splits the giant `non_local_definitions` lint UI test in separate test files.

This change is extracted from rust-lang#123594 (where it was requested rust-lang#123594 (comment)), to ease the review of the other PR and to reduce the size of the other PR.

r? ``@compiler-errors``
…li-obk

Stop making any assumption about the projections applied to the upvars in the `ByMoveBody` pass

So it turns out that because of subtle optimizations like [`truncate_capture_for_optimization`](https://github.com/rust-lang/rust/blob/ab5bda1aa70f707014e2e691e43bc37a8819252a/compiler/rustc_hir_typeck/src/upvar.rs#L2351), we simply cannot make any assumptions about the shape of the projections applied to the upvar locals in a coroutine body.

So stop doing that -- the code is resilient to such projections, so the assertion really existed only to "protect against the unknown".

r? oli-obk
Fixes rust-lang#123650
…li-obk

Don't rely on upvars being assigned just because coroutine-closure kind is assigned

Previously, code relied on the implicit assumption that if a coroutine-closure's kind variable was constrained, then its upvars were also constrained. This is because we assign all of them at once at the end up upvar analysis.

However, there's another way that a coroutine-closure's kind can be constrained: from a signature hint in closure signature deduction. After rust-lang#123350, we use these hints, which means the implicit assumption above no longer holds.

This PR adds the necessary checks so that we don't ICE.

r? oli-obk
Fix typo in `Future::poll()` docs

``@rustbot`` label A-docs
…lor, r=clubby789

compiletest: unset `RUSTC_LOG_COLOR`

If this leaks in from the environment then it can make tests fail when they deliberately trigger `WARN` or `ERROR` logging, currently this stops these tests from failing if you set `RUSTC_LOG_COLOR=always` in the parent environment:

- `tests/ui/coherence/occurs-check/associated-type.rs#next`
- `tests/ui/coherence/occurs-check/associated-type.rs#old`
- `tests/ui/higher-ranked/structually-relate-aliases.rs`
- `tests/ui/self/arbitrary-self-from-method-substs.rs#default`
- `tests/ui/traits/next-solver/issue-118950-root-region.rs`
@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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Apr 9, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Apr 9, 2024

📌 Commit ed43ac6 has been approved by GuillaumeGomez

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

bors commented Apr 9, 2024

⌛ Testing commit ed43ac6 with merge ff24ef9...

@bors
Copy link
Contributor

bors commented Apr 9, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing ff24ef9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 9, 2024
@bors bors merged commit ff24ef9 into rust-lang:master Apr 9, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 9, 2024
@GuillaumeGomez GuillaumeGomez deleted the rollup-1hurixy branch April 9, 2024 14:15
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#123254 Do not allocate for ZST ThinBox (attempt 2 using const_allo… ffe5ff20721ff84477e5222b0791246364f64da9 (link)
#123626 Add MC/DC support to coverage test tools 9747365353079e064cab9c68ec9f8dee45a0b15f (link)
#123638 rustdoc: synthetic auto: filter out clauses from the implem… 5006b06edfeff227f89d8199df2b872c130f6382 (link)
#123653 Split non_local_definitions lint tests in separate test f… 8a1cbcf4815f5be931e648b6b20460b19f729e8b (link)
#123658 Stop making any assumption about the projections applied to… e84041b28d1e1e8ee91aef5ff2e923030cefcdb4 (link)
#123662 Don't rely on upvars being assigned just because coroutine-… 8bb676b176e49402ad406be9ab5b12aba921e383 (link)
#123665 Fix typo in Future::poll() docs ec246ef66691fc6f321d5a1be096ad14c1ba55b5 (link)
#123672 compiletest: unset RUSTC_LOG_COLOR e3a44f424b9015bdfa6e6286b6033c1335e99b30 (link)

previous master: 2805aedf9f

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 (ff24ef9): 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.5% [-0.5%, -0.5%] 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)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 1

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: 672.546s -> 674.634s (0.31%)
Artifact size: 318.40 MiB -> 318.42 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet