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 #121036

Merged
merged 26 commits into from
Feb 13, 2024
Merged

Rollup of 8 pull requests #121036

merged 26 commits into from
Feb 13, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tshepang and others added 26 commits August 16, 2023 06:28
The check within changed from `delay_span_bug` to `delay_good_path_bug`
in rust-lang#110476, and removing the check altogether was considered. It's a
very weak sanity check and gets in the way of removing good path delayed
bugs altogether, so this PR just removes it.
It's only has a single remaining purpose: to ensure that a diagnostic is
printed when `trimmed_def_paths` is used. It's an annoying mechanism:
weak, with odd semantics, badly named, and gets in the way of other
changes.

This commit replaces it with a simpler `must_produce_diag` mechanism,
getting rid of a diagnostic `Level` along the way.
with this, alias-relate treats all aliases the same way
and it can be used for structural normalization.
Swapping the direction of this merge produces the same results, but means that
we never need to mutate `curr`.
Now that we never mutate `curr.span`, we don't need to store its original span
separately.
This requires some extra boilerplate, but in exchange it becomes much easier to
see how each field and method is actually used.
Now that `prev` has its own dedicated struct, we can store the original span in
that struct, instead of in a separate field in the refiner.
If we only check for duplicate spans when `prev` is unmodified, we reduce the
number of situations that `update_pending_dups` needs to handle.

This could potentially change the coverage spans we produce in some unknown
corner cases, but none of our current coverage tests indicate any change.
…erge, r=GuillaumeGomez

rustdoc: Fix handling of doc_auto_cfg feature for cfg attributes on glob reexport

This is a follow-up of rust-lang#120501 and a part of rust-lang#120487.

r? `@notriddle`
modify alias-relate to also normalize ambiguous opaques

allows a bunch of further cleanups and generally simplifies the type system. To handle rust-lang/trait-system-refactor-initiative#8 we'll have to add a some additional complexity to the `(Alias, Infer)` branches in alias-relate, so removing the opaque type special case here is really valuable.

It does worsen `deduce_closure_signature` and friends even more as they now receive an inference variable which is only constrained via an `AliasRelate` goal. These probably have to look into alias relate goals somehow. Leaving that for a future PR as this is something we'll have to tackle regardless.

r? `@compiler-errors`
Remove good path delayed bugs

Because they're not that useful, and kind of annoying. Details in the individual commits.

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

match lowering: simplify block creation

Match lowering was doing complicated things with block creation. As far as I can tell it was trying to avoid creating unneeded blocks, but of the three places that start out with `otherwise = &mut None`, two of them called `otherwise.unwrap_or_else(|| self.cfg.start_new_block())` anyway. As far as I can tell the only place where this PR makes a difference is in `lower_match_tree`, which did indeed sometimes avoid creating the unreachable final block + FakeRead. Unless this is important I propose we do the naive thing instead.

I have not checked all the graph isomorphisms by hand, but at a glance the test diff looks sensible.

r? `@matthewjasper`
coverage: Simplify some parts of the coverage span refiner

This is another incremental step on my quest to dismantle the coverage span refiner into something more understandable and maintainable.

The biggest change here is splitting up `CoverageSpan` into several more specific structs. Doing so reveals that most of the places that were using that struct only need a subset of its fields and methods.

We can also get rid of separate tracking of `curr_original_span` and `prev_original_span`, by observing that `curr.span` never actually needs to be mutated, and that we can store `prev_original_span` directly in the dedicated struct for `prev`.

`@rustbot` label +A-code-coverage
…nk-chapter, r=notriddle

Extend intra-doc link chapter in the rustdoc book

Linked to rust-lang#117178.

r? `@notriddle`
RustWrapper: adapt for coverage mapping API changes

There've been a number of changes to the coverage mapping API today, but the end result is that specifying the MCDC parameters is now optional (they've been moved to the end of the argument list and now default to `std::monostate`).

`@rustbot` label: +llvm-main

r? `@durin42`
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 13, 2024
@rustbot rustbot added WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Feb 13, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Feb 13, 2024

📌 Commit 8dffa39 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 Feb 13, 2024
@bors
Copy link
Contributor

bors commented Feb 13, 2024

⌛ Testing commit 8dffa39 with merge a84bb95...

@bors
Copy link
Contributor

bors commented Feb 13, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 13, 2024
@bors bors merged commit a84bb95 into rust-lang:master Feb 13, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 13, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#114877 unstable-book: add quick-edit link 7f5c004e84840ac6e5ae3365c6a74d30eb1dd2f3 (link)
#120548 rustdoc: Fix handling of doc_auto_cfg feature for cfg attri… dac37af46a2fc675e7a41ed49f0feccee1135ba2 (link)
#120549 modify alias-relate to also normalize ambiguous opaques ebf98ff49d0dfda686df7d8e8624658eafeb46a3 (link)
#120959 Remove good path delayed bugs 618e57c02f0fb02f1f3aa40c8fbce4ae75403112 (link)
#120978 match lowering: simplify block creation 16667536c8ba11f045033526b5f21dffe89c4bbb (link)
#121019 coverage: Simplify some parts of the coverage span refiner 737609e12d266a20211c0867dd74957490d5453a (link)
#121021 Extend intra-doc link chapter in the rustdoc book 4dc37c13c6106a9dad845c75179204e34d610d8a (link)
#121031 RustWrapper: adapt for coverage mapping API changes a8ffdcff48d7c81c3b16b86dbc6421fb0e27eb74 (link)

previous master: eaff1af8fd

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

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)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-3.1%, -2.0%] 4
All ❌✅ (primary) 3.3% [3.3%, 3.3%] 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)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
2.4% [2.4%, 2.6%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.0%, -1.0%] 1
All ❌✅ (primary) 3.2% [3.2%, 3.2%] 1

Binary size

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

Bootstrap: 631.785s -> 628.588s (-0.51%)
Artifact size: 305.10 MiB -> 305.10 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-ul05q8e branch March 16, 2024 18:19
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-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.