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
While it is stated that this lint cannot catch loops over dynamically defined ranges, it could be improved to catch the following common pattern:
let x = 5u32;for i in x..0{ ...}
Note that it is a range over unsigned values, so it makes no sense for the right side to be zero (as the range will always be empty then). Similar check could be done for signed integers by iXXX::MIN const.
The text was updated successfully, but these errors were encountered:
While it is stated that this lint cannot catch loops over dynamically defined ranges, it could be improved to catch the following common pattern:
Note that it is a range over unsigned values, so it makes no sense for the right side to be zero (as the range will always be empty then). Similar check could be done for signed integers by
iXXX::MIN
const.The text was updated successfully, but these errors were encountered: