Skip to content

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Sep 26, 2025

fixes rust-lang/trait-system-refactor-initiative#232

annoyingly subtle, imagine the following proof tree

  • A (no cycle head usages, final result Y)
    • ignored B (depends on A with provisional result X)
      • A (cycle, provisional result X)
  • B (using the cache entry here incorrectly assumes A has final result X)

r? @BoxyUwU

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 26, 2025
@lcnr lcnr requested a review from Copilot September 26, 2025 11:49
Copilot

This comment was marked as outdated.

@lcnr lcnr force-pushed the provisional-cache-woops branch 2 times, most recently from 19c2f98 to a09eb21 Compare September 26, 2025 11:54

let Some(new_highest_head_index) = heads.opt_highest_cycle_head_index() else {
return false;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved earlier for potential perf gains. no need to do anything more involved if we need to pop anyways

@lcnr
Copy link
Contributor Author

lcnr commented Sep 26, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 26, 2025
fix rebasing cycle heads when not reaching a fixpoint
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 26, 2025
@lcnr lcnr force-pushed the provisional-cache-woops branch from a09eb21 to 4162c32 Compare September 26, 2025 11:58
@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@lcnr lcnr force-pushed the provisional-cache-woops branch from 4162c32 to 1b9c2aa Compare September 26, 2025 12:13
@lcnr
Copy link
Contributor Author

lcnr commented Sep 26, 2025

@bors cancel

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 26, 2025
fix rebasing cycle heads when not reaching a fixpoint
@lcnr lcnr force-pushed the provisional-cache-woops branch 3 times, most recently from fc530f5 to 0c9a691 Compare September 26, 2025 12:48
@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr force-pushed the provisional-cache-woops branch from 82a3ee6 to ae34c8d Compare September 26, 2025 13:19
@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 26, 2025

r=me if ci and perf good

@BoxyUwU BoxyUwU added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 26, 2025
@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr force-pushed the provisional-cache-woops branch from ae34c8d to 4e44d58 Compare September 26, 2025 13:29
@rust-bors
Copy link

rust-bors bot commented Sep 26, 2025

☀️ Try build successful (CI)
Build commit: a7a478b (a7a478bb1c36795d5c8eb82ffec98b5b4200479d, parent: 5b9007bfc358817cf066ee27c6b440440727d3a7)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a7a478b): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary 1.2%, secondary 2.3%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.9%, 3.0%] 2
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [-2.2%, 3.0%] 3

Cycles

Results (primary -1.8%, secondary -3.9%)

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

mean range count
Regressions ❌
(primary)
4.0% [2.0%, 5.4%] 6
Regressions ❌
(secondary)
4.0% [3.3%, 4.8%] 6
Improvements ✅
(primary)
-4.0% [-9.8%, -2.1%] 16
Improvements ✅
(secondary)
-6.5% [-19.9%, -1.0%] 18
All ❌✅ (primary) -1.8% [-9.8%, 5.4%] 22

Binary size

Results (secondary 0.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)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 478.827s -> 470.609s (-1.72%)
Artifact size: 388.10 MiB -> 388.06 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 26, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 26, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 26, 2025

📌 Commit 4e44d58 has been approved by BoxyUwU

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 26, 2025
@lcnr
Copy link
Contributor Author

lcnr commented Sep 27, 2025

@bors rollup

Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 28, 2025
…xyUwU

fix rebasing cycle heads when not reaching a fixpoint

fixes rust-lang/trait-system-refactor-initiative#232

annoyingly subtle, imagine the following proof tree

- A (no cycle head usages, final result Y)
  - *ignored* B (depends on A with provisional result X)
    - A (cycle, provisional result X)
- B (using the cache entry here incorrectly assumes A has final result X)

r? `@BoxyUwU`
bors added a commit that referenced this pull request Sep 28, 2025
Rollup of 16 pull requests

Successful merges:

 - #142139 (Include additional hashes in src/stage0)
 - #146745 (Clarified error note for usize range matching)
 - #146763 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5))
 - #146788 (chore: removes deprecated discord.)
 - #146942 ([rustdoc] Finish getting rid of usages `write_str`)
 - #147002 (rustdoc-search: stringdex update with more packing)
 - #147061 (fix rebasing cycle heads when not reaching a fixpoint)
 - #147066 (Fix tracking issue number for feature(macro_attr))
 - #147081 (doc: fix a typo in platform-support.md)
 - #147082 (formatting_options: fix alternate docs 0b/0o mixup)
 - #147086 (compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta)
 - #147092 (Do not compute optimized MIR if code does not type-check.)
 - #147093 (redox: switch to colon as path separator)
 - #147095 (Library: Remove remaining private `#[repr]` workarounds)
 - #147098 (Add auto extra-checks in pre-push hook)
 - #147110 (Fix typo)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 28, 2025
Rollup of 14 pull requests

Successful merges:

 - #142139 (Include additional hashes in src/stage0)
 - #146745 (Clarified error note for usize range matching)
 - #146763 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5))
 - #146788 (chore: removes deprecated discord.)
 - #146942 ([rustdoc] Finish getting rid of usages `write_str`)
 - #147061 (fix rebasing cycle heads when not reaching a fixpoint)
 - #147066 (Fix tracking issue number for feature(macro_attr))
 - #147081 (doc: fix a typo in platform-support.md)
 - #147082 (formatting_options: fix alternate docs 0b/0o mixup)
 - #147086 (compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta)
 - #147093 (redox: switch to colon as path separator)
 - #147095 (Library: Remove remaining private `#[repr]` workarounds)
 - #147098 (Add auto extra-checks in pre-push hook)
 - #147110 (Fix typo)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cb4c3ad into rust-lang:master Sep 28, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 28, 2025
rust-timer added a commit that referenced this pull request Sep 28, 2025
Rollup merge of #147061 - lcnr:provisional-cache-woops, r=BoxyUwU

fix rebasing cycle heads when not reaching a fixpoint

fixes rust-lang/trait-system-refactor-initiative#232

annoyingly subtle, imagine the following proof tree

- A (no cycle head usages, final result Y)
  - *ignored* B (depends on A with provisional result X)
    - A (cycle, provisional result X)
- B (using the cache entry here incorrectly assumes A has final result X)

r? ``@BoxyUwU``
@lcnr lcnr deleted the provisional-cache-woops branch September 28, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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.

"Type mismatch resolving..." only on new trait solver
6 participants