-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Possibly invalid "unconstrained types" calling trait method with constraints #12028
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
Comments
cc me |
Visiting for triage, still relevant. |
Was this determined to be the proper behavior? If not, we should probably reopen all the bugs #18324 closed. |
I believe this is the expected behavior. What happens is that the trait matcher observes that there are no impls of Note that if you add even one impl, e.g.:
you get the same error you had before, because now there is genuine ambiguity (did you mean |
To be honest, I don't think there's a bug here. Where there is ambiguity, the impl matcher refuses to guess. You could use UFCS form to be more explicit about the type |
Well, there is probably a (separate) bug in that the following does not work:
which I rather expected to. |
Anyway, going to close since I think this is working as expected. |
Note: with the changes I am making to support "impl trait for trait" (shorthand term meaning that a trait object |
internal: Fix changelog generation after repo move
Here is some example code:
This errors with:
One possibility is that the unconstrained type checker isn't taking in consideration of the
impl<S: Stream, H: StreamHasher<S>> Hash<H> for u8
constraint and is only being evaluated in context of the unconstrainedHash<H>
trait.The text was updated successfully, but these errors were encountered: