-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made matching machine types equal to float, int, uint (fixes #1376)
- Loading branch information
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7fd62bb
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.
If I am reading this correctly, it unifies
uint
andu32/u64
(depending on target). Does this mean that you can have a program which typechecks when targeting 64-bit but not 32-bit? This seems... unfortunate. I would expect that if I am fastidious about using uint and int, my program will be portable.I understand the problem of the math module, but I'd rather this unification be "opt-in", either by adding another integral type or by having an attribute on the module being type-checked.
7fd62bb
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.
Did you see the thread on #1376? It is a trade-off and I would like to keep this patch for now, perhaps we could add an option to rustc that will produce warnings or errrors in the presence of potential overflows.
7fd62bb
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.
missed that thread. ok, sounds good.