-
Notifications
You must be signed in to change notification settings - Fork 97
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
Understanding type errors #134
Comments
I'm triaging issues and just realized I never responded when I added the tags. In short I really don't have any great suggestions at the current time. The Rust issue you noted along with the day that |
|
Some, but messages will still be verbose. There was some discussion about this for a proof-of-concept someone made not too long ago. |
FWIW: Also, the recently merged rust-lang/rust#73996 should help make |
I wonder whether the MVP that is stabilised will help at all? AFAIK,
from the PoC linked above does not work. My understanding was that the MVP will help libraries like |
Uom does a great job of disallowing illegal operations on incompatible units, but currently the compile-time errors produced are not very straightforward.
A basic example:
results in the following compiler output:
Are there known ways to improve the debugging process in this situation? My current approach is to figure out which two variables are involved, what their respective units are, and why the operation on those units doesn't make sense.
There are open rustc issues like rust-lang/rust#50310 that would turn
into
which is a solid readability improvement, but doesn't really help me see what the logical error in the code is. Is it possible to do better with what we have in the compiler now? Any tips and tricks are greatly appreciated.
The text was updated successfully, but these errors were encountered: