You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should have some way of using Option<uint> (or a moral equivalent) for integers with an excluded sentinel value, e.g. MovePathIndex in librustc. It's frustrating that Option isn't actually a zero-cost abstraction, forcing you to fall back to manually checking sentinel values.
The text was updated successfully, but these errors were encountered:
A problem here is that you take a mutable reference to that uint and now all arithmetic on it has to be checked to make sure you don't fall into the None value.
We should have some way of using
Option<uint>
(or a moral equivalent) for integers with an excluded sentinel value, e.g.MovePathIndex
inlibrustc
. It's frustrating thatOption
isn't actually a zero-cost abstraction, forcing you to fall back to manually checking sentinel values.The text was updated successfully, but these errors were encountered: