-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
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() { |
There was a problem hiding this comment.
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
There was a problem hiding this 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
1217199
to
480f414
Compare
480f414
to
e320112
Compare
@bors r=lcnr rollup |
…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
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