-
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
Implemented Mul operator trait can't be used #22099
Comments
Maybe a dup of #19035 ? Seems similar. |
I'm not sure and here's the reason: in #19035, today's coherence rules don't allow the correct trait impls to define addition/multiplication both ways. What made me react in this bug was that the trait impls are accepted by the compiler, but the operator still doesn't work. |
I don't think coherence rules prevent this: there's no way a sibling crate could contain a different implementation of It can't implement a generic version, |
Isn't this a big 1.0 problem? You can do lots of things but not math... |
Fixes rust-lang#22743. Fixes rust-lang#19035. Fixes rust-lang#22099. (Those all seem to be exactly the same scenario.)
A user provided the following test case that fails compiling at the point where the
*
operator is used.The text was updated successfully, but these errors were encountered: