-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ambiguity in assemble_candidates_after_normalizing_self_ty
causes coherence error
#52
Comments
I don't think we want to add any reasoning like this 🤔 at least if we can avoid it. It feels quite subtle to get right and complicates our rules. The general pattern here is allowed because of an unsoundness in the old solver, see rust-lang/rust#114061. If we care about not breaking the affected crate we should instead add a negative impl to core and rely on negative coherence to get |
opened nikis05/derive-visitor#16, closing |
This coherence failure...
... is because the goal
<&'a () as IntoIterator>::Item: DerefAndDrive
is considered ambiguous when unifying the two impls above. That's because we try normalizing the self type of the goal, and&'a (): IntoIterator
is treated as unknowable.I think this is problematic, because even if we were to add an upstream implementation to be able to normalize
<&'a () as IntoIterator>::Item
, it couldn't implementDerefAndDrive
since that's a trait local to the crate.The text was updated successfully, but these errors were encountered: