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

Implement some FIXME methods in the new trait solver #106742

Merged
merged 2 commits into from
Jan 15, 2023

Conversation

compiler-errors
Copy link
Member

Implement just enough of the solver's response logic to make it not ICE.

Also, fix a bug with no_bound_vars call failing due to canonical bound vars.

r? @lcnr

@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 Jan 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2023

Some changes occurred to the core trait solver

cc @lcnr, @compiler-errors

@compiler-errors compiler-errors changed the title New solver make it not ice Implement some FIXME methods in the new trait solver Jan 11, 2023
@bors
Copy link
Contributor

bors commented Jan 12, 2023

☔ The latest upstream changes (presumably #106743) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors compiler-errors force-pushed the new-solver-make-it-not-ice branch 2 times, most recently from 4bf30e5 to 10c12a5 Compare January 12, 2023 05:42
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

r=me after nits

@compiler-errors compiler-errors force-pushed the new-solver-make-it-not-ice branch from 10c12a5 to 1de196f Compare January 12, 2023 21:01
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Jan 13, 2023

📌 Commit 1de196f 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 Jan 13, 2023
}),
) else { bug!(); };
assert!(obligations.is_empty());
value
Copy link
Contributor

Choose a reason for hiding this comment

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

ah, this should be resp.certainty. The rest of this hack is fine, but overflow handling is completely wrong because of this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wait, this returns value which is just resp.certainty (mapped under instantiate_query_response_and_region_obligations, but for overflows it shouldn't matter, right?)

Otherwise not sure if I understand this comment.

Copy link
Contributor

@lcnr lcnr Jan 14, 2023

Choose a reason for hiding this comment

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

ah, I was confused sorry 😅 didn't see that you provided resp.certainty twice, once as value and once as certainty

@BoxyUwU BoxyUwU added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Jan 15, 2023
@bors
Copy link
Contributor

bors commented Jan 15, 2023

⌛ Testing commit 1de196f with merge ae4d89d...

@bors
Copy link
Contributor

bors commented Jan 15, 2023

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing ae4d89d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 15, 2023
@bors bors merged commit ae4d89d into rust-lang:master Jan 15, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 15, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ae4d89d): 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.4% [-0.5%, -0.3%] 6
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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-1.9% [-2.6%, -0.9%] 3
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Cycles

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

@compiler-errors compiler-errors deleted the new-solver-make-it-not-ice branch August 11, 2023 20:09
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. 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.

6 participants