-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improve diagnostics for HostEffectPredicate
in the new solver
#132345
base: master
Are you sure you want to change the base?
Conversation
HostEffectPredicate
in the new solver
☔ The latest upstream changes (presumably #132371) made this pull request unmergeable. Please resolve the merge conflicts. |
0cbc3ae
to
bb76b62
Compare
☔ The latest upstream changes (presumably #132479) made this pull request unmergeable. Please resolve the merge conflicts. |
bb76b62
to
b921c6a
Compare
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
r? lcnr |
@@ -16,6 +16,11 @@ error[E0277]: the trait bound `T: ~const Bar` is not satisfied | |||
LL | type Assoc<T> = C<T> | |||
| ^^^^ | |||
| | |||
note: required for `C<T>` to implement `~const Bar` |
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 is the net effect of the change.
@@ -14,9 +14,9 @@ trait Trait { | |||
|
|||
const fn unqualified<T: Trait>() { | |||
T::Assoc::func(); | |||
//~^ ERROR the trait bound `T: ~const Trait` is not satisfied | |||
//~^ ERROR the trait bound `<T as Trait>::Assoc: ~const Trait` is not satisfied |
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.
We don't treat the GAT where clauses as where clauses for a goal source... should we?
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.
depends on where and how we prove them. I think for diagnostics, the answer should be yes, for cycle handling maybe no?
impl_const_condition_bound_count, | ||
parent_host_pred, | ||
)); | ||
impl_const_condition_bound_count += 1; |
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.
why use a separate counter here? We should only ever track one of the two, shouldn't we?
r=me after nit |
Adds derived cause for host effect predicates. Some diagnostics regress, but that's connected to the fact that our predicate visitor doesn't play well with aliases just yet.