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

Get rid of subst-relate incompleteness in new solver #113901

Merged
merged 1 commit into from
Jul 22, 2023

Conversation

compiler-errors
Copy link
Member

We shouldn't need subst-relate if we have bidirectional-normalizes-to in the new solver.

The only potential issue may happen if we have an unconstrained projection like <Wrapper<?0> as Trait>::Assoc == <Wrapper<T> as Trait>::Assoc where they both normalize to something that doesn't mention any substs, which would possibly prefer ?0 = T if we fall back to subst-relate. But I'd prefer if we remove incompleteness until we can determine some case where we need them, and the bidirectional-normalizes-to seems better to have in general.

I can update rust-lang/trait-system-refactor-initiative#26 and rust-lang/trait-system-refactor-initiative#25 once this lands.

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 20, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 20, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@@ -81,9 +83,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
// As this is incomplete, we must not do so during coherence.
match self.solver_mode() {
Copy link
Contributor

Choose a reason for hiding this comment

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

this comment is wrong, please also link to rust-lang/trait-system-refactor-initiative#25

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 updating comment

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented Jul 22, 2023

📌 Commit e320112 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 Jul 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 22, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#112508 (Tweak spans for self arg, fix borrow suggestion for signature mismatch)
 - rust-lang#113901 (Get rid of subst-relate incompleteness in new solver)
 - rust-lang#113948 (Fix rustc-args passing issue in bootstrap)
 - rust-lang#113950 (Remove Scope::Elision from bound-vars resolution.)
 - rust-lang#113957 (Add regression test for issue rust-lang#113941 - naive layout isn't refined)
 - rust-lang#113959 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8f4b81b into rust-lang:master Jul 22, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 22, 2023
@compiler-errors compiler-errors deleted the only-bidi-norm branch August 11, 2023 20:12
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.

4 participants