Skip to content

Rollup of 5 pull requests#154838

Merged
rust-bors[bot] merged 14 commits intorust-lang:mainfrom
Zalathar:rollup-lqjuxmF
Apr 5, 2026
Merged

Rollup of 5 pull requests#154838
rust-bors[bot] merged 14 commits intorust-lang:mainfrom
Zalathar:rollup-lqjuxmF

Conversation

@Zalathar
Copy link
Copy Markdown
Member

@Zalathar Zalathar commented Apr 5, 2026

Successful merges:

r? @ghost

Create a similar rollup

Zalathar and others added 14 commits March 29, 2026 14:37
Moving this code here makes the subsequent cleanup easier.
The existing code contains some very strange control flow that can put the dep
graph into an inconsistent and untested state if streaming output setup fails.

(Specifically, that failure would put `DepGraph` into an "empty" state intended
for non-incremental compilation, but other parts of the compiler would still
think that incremental mode is enabled due to `sess.opts.incremental`.)

This commit therefore performs a big overhaul of `setup_dep_graph` by:

- Returning immediately in non-incremental mode.
- Exiting immediately if dep-graph streaming output couldn't be set up.
- Inlining some "helper" functions that were more confusing than helpful.
- Make the enum non-public
- Replace the generic `<T>` with concrete fields
- Rename variant `LoadDepGraph` to `IoError`
This hashmap was added in rust-lang#42625 and is used for debug-only printing. If
a key isn't recoverable, `DepNode::construct` will create a string for
it (using `DepNodeKey::to_debug_str`) and insert the string in the
hashmap, but only if (a) it's a debug build, and (b)
`-Zincremental-info` or `-Zquery-dep-graph` is specified. ("Recoverable"
here means the fingerprint style is `KeyFingerPrintStyle::Opaque`.)

`DepNode::fmt` will then use this string to produce output showing the
key itself, and not just its fingerprint.

All this code is debug-only. Some of it is guarded with
`#[cfg(debug_assertions)]`, but some is not.

However, the `tcx.def_path_debug_str()` path in `DepNode::fmt` seems to
be unreachable. Because it's debug-only it can't be used by normal users
and so must only be there for rustc devs. But even in a debug build I
was unable to trigger that path. I tried changing it to a panic and ran
the full test suite without problem, and then I tried various flag
combinations and scenarios also without hitting it. The
`-Zincremental-info` condition doesn't make sense because that only
prints high-level info about queries, not individual keys. So the path
is either unreachable, or so hard to reach that it's not providing any
actual value.

This commit removes all this code.
Make `setup_dep_graph` incremental-only and more straightforward

The existing code contains some very strange control flow that can put the dep graph into an inconsistent and untested state if streaming output setup fails.

(Specifically, that failure would put `DepGraph` into an "empty" state intended for non-incremental compilation, but other parts of the compiler would still think that incremental mode is enabled due to `sess.opts.incremental`.)

This PR therefore performs a big overhaul of `setup_dep_graph` by:

- Returning immediately in non-incremental mode.
- Exiting immediately if dep-graph streaming output couldn't be set up.
- Inlining some "helper" functions that were more confusing than helpful.
…de_debug, r=cjgillot

Remove `DepGraphData::dep_node_debug`.

This hashmap was added in rust-lang#42625 and is used for debug-only printing. If a key isn't recoverable, `DepNode::construct` will create a string for it (using `DepNodeKey::to_debug_str`) and insert the string in the hashmap, but only if (a) it's a debug build, and (b) `-Zincremental-info` or `-Zquery-dep-graph` is specified. ("Recoverable" here means the fingerprint style is `KeyFingerPrintStyle::Opaque`.)

`DepNode::fmt` will then use this string to produce output showing the key itself, and not just its fingerprint.

All this code is debug-only. Some of it is guarded with `#[cfg(debug_assertions)]`, but some is not.

However, the `tcx.def_path_debug_str()` path in `DepNode::fmt` seems to be unreachable. Because it's debug-only it can't be used by normal users and so must only be there for rustc devs. But even in a debug build I was unable to trigger that path. I tried changing it to a panic and ran the full test suite without problem, and then I tried various flag combinations and scenarios also without hitting it. The `-Zincremental-info` condition doesn't make sense because that only prints high-level info about queries, not individual keys. So the path is either unreachable, or so hard to reach that it's not providing any actual value.

This commit removes all this code.

r? @cjgillot
…e-152893, r=Kivooeo

add regression test for EII declaration conflicting with constructor

fixs: rust-lang#152893

add regression test
…686, r=Kivooeo

add regression test for 119686

closes rust-lang#119686
…382, r=Kivooeo

Add three tests for fixed issues (two ICEs and one coherence checking failure that now passes)

Closes rust-lang#112588.
Closes rust-lang#113793.
Closes rust-lang#119382.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 5, 2026
@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. labels Apr 5, 2026
@Zalathar
Copy link
Copy Markdown
Member Author

Zalathar commented Apr 5, 2026

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 5, 2026

📌 Commit 549c4e4 has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 5, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 5, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 5, 2026

☀️ Test successful - CI
Approved by: Zalathar
Duration: 3h 9m
Pushing e73c56a to main...

@rust-bors rust-bors bot merged commit e73c56a into rust-lang:main Apr 5, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 5, 2026
@Zalathar Zalathar deleted the rollup-lqjuxmF branch April 5, 2026 09:44
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#154529 Make setup_dep_graph incremental-only and more straightfo… 1ef3445e097e6ab3d3f33573018d7f1806134f5d (link)
#154565 Remove DepGraphData::dep_node_debug. e9ccd6edc22009278cb0cfb6ab04a916a233d911 (link)
#154799 add regression test for EII declaration conflicting with co… 0f5a405e84430c184f41b373fedda9b10629facc (link)
#154807 add regression test for 119686 126033235abd62d8a76db4e0b53c0094d9d64c1c (link)
#154821 Add three tests for fixed issues (two ICEs and one coherenc… 23f269b6d031e96533f838b538f52ddb902beb94 (link)

previous master: f92020a676

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing f92020a (parent) -> e73c56a (this PR)

Test differences

Show 10 test diffs

Stage 1

  • [ui] tests/ui/borrowck/async-trait-proposes-let-binding.rs: [missing] -> pass (J0)
  • [ui] tests/ui/closures/closure-2021-captures-lint-field-projection-ice-119382.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coherence/negative-coherence-ref-negative-impl.rs: [missing] -> pass (J0)
  • [ui] tests/ui/generic-associated-types/ice-add-outlives-bounds-unexpected-regions-113793.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/borrowck/async-trait-proposes-let-binding.rs: [missing] -> pass (J1)
  • [ui] tests/ui/closures/closure-2021-captures-lint-field-projection-ice-119382.rs: [missing] -> pass (J1)
  • [ui] tests/ui/coherence/negative-coherence-ref-negative-impl.rs: [missing] -> pass (J1)
  • [ui] tests/ui/generic-associated-types/ice-add-outlives-bounds-unexpected-regions-113793.rs: [missing] -> pass (J1)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e73c56abd0baf3dbaafbdc3ce6072a416aade867 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-i686-msvc: 1h 48m -> 2h 15m (+24.9%)
  2. dist-x86_64-apple: 2h 2m -> 1h 38m (-20.2%)
  3. aarch64-gnu-debug: 1h 4m -> 1h 17m (+19.1%)
  4. pr-check-1: 27m 19s -> 31m 53s (+16.7%)
  5. x86_64-rust-for-linux: 45m 41s -> 52m 33s (+15.0%)
  6. x86_64-gnu-llvm-21-3: 1h 41m -> 1h 56m (+14.9%)
  7. x86_64-gnu-llvm-22-3: 1h 40m -> 1h 54m (+13.4%)
  8. aarch64-gnu-llvm-21-2: 44m 35s -> 50m 34s (+13.4%)
  9. x86_64-gnu-aux: 2h 5m -> 2h 22m (+12.9%)
  10. test-various: 1h 44m -> 1h 56m (+12.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e73c56a): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 2

Max RSS (memory usage)

Results (secondary 1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary 2.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 492.059s -> 493.268s (0.25%)
Artifact size: 395.04 MiB -> 395.03 MiB (-0.00%)

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 T-compiler Relevant to the compiler 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