-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Auto type binary operators #4272
Conversation
3c3b8f7
to
c93e588
Compare
The ubuntu mysql fails seem unrelated. |
Yes the test failures are unrelated. I hadn't the time to investigate them yet. What seems to be really strange is that the test itself passes, but nextest then reports a sigsev
|
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.
Overall this change looks good to me. Thanks for submitting.
I think PartialEq
is not handled correctly yet, we might just need to mark it as unsupported for now?
syn::BinOp::BitOr(_) => "BitOr", | ||
syn::BinOp::Shl(_) => "Shl", | ||
syn::BinOp::Shr(_) => "Shr", | ||
syn::BinOp::Eq(_) => "PartialEq", |
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.
I think that case won't work. PartialEq
is neither a member of std::ops
nor has it an associated type Output
. Maybe we can just mark it as unsupported for now?
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.
Ah right this one should have been among the "always boolean". 👍
fixed.
22a954c
to
33cfe72
Compare
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.
Thanks for the update, I just added a correction to remove the now wrong comment about the fact that we implement all the ops as PartialEq
is now missing.
It's not missing: there is no |
7c6a524
to
33cfe72
Compare
You are correct, I just search for |
Auto type binary operators
8edd17b
to
33cfe72
Compare
This adds support for type inference of e.g. `some_timestamptz_column - some_pginterval_expression`
33cfe72
to
cfd2a56
Compare
This adds support for type inference of e.g.
some_timestamptz_column - some_pginterval_expression
.Also adds support for
update(...)
expression (I found myself needing it for the test).