Skip to content

Don't walk into Certainty::Yes goals #142085

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jun 5, 2025

Don't walk into Certainty::Yes goals in the pending obligation finding code, since they will not have been stalled on an infer var anyways

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 5, 2025
@compiler-errors
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 5, 2025

⌛ Trying commit 54b62fc with merge 3e60047

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 5, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 5, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 5, 2025

☀️ Try build successful (CI)
Build commit: 3e60047 (3e60047b763a2a4010050b95bbae403458280cff)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3e60047): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.5% [-16.2%, -0.8%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 1.1%, secondary -0.8%)

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)
4.3% [4.3%, 4.3%] 1
Regressions ❌
(secondary)
3.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-2.1% [-2.7%, -0.9%] 3
All ❌✅ (primary) 1.1% [-2.1%, 4.3%] 2

Cycles

Results (secondary -12.8%)

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-12.8% [-14.8%, -9.2%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 750.544s -> 750.657s (0.02%)
Artifact size: 371.78 MiB -> 371.72 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 5, 2025
@compiler-errors compiler-errors changed the title [perf] test Don't walk into Certainty::Yes goals Jun 5, 2025
@compiler-errors
Copy link
Member Author

r? lcnr

@compiler-errors compiler-errors marked this pull request as ready for review June 5, 2025 19:47
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2025

changes to inspect_obligations.rs

cc @compiler-errors, @lcnr

// No need to walk into goal subtrees that certainly hold, since they
// wouldn't then be stalled on an infer var.
if inspect_goal.result() == Ok(Certainty::Yes)
&& !matches!(
Copy link
Member Author

Choose a reason for hiding this comment

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

We currently report nested goals as Certainty::Yes even if they had nested goals... we could/should fix that?

Copy link
Contributor

Choose a reason for hiding this comment

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

normalizes-to goals?

in InspectGoal::new, we should also eagerly try to prove the nested goals if the normalizes_to_term_hack is Some 🤔

r=me with a FIXME here saying that normalizes-to nested goals are kinda scuffed or actually fix the impl in this PR

Copy link
Member Author

Choose a reason for hiding this comment

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

normalizes-to goals?

Yes, typo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed by #142127.

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup=never

@bors
Copy link
Collaborator

bors commented Jun 6, 2025

📌 Commit db1ceca has been approved by lcnr

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 Jun 6, 2025
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants