4444444444_f32 is actually the number 4444444700 because f32 doesn't have enough bits to represent 4444444444. This seems like an obvious thing we should be linting against, but http://play.rust-lang.org/?gist=3e360c4ab4deb3ef9cc16b9c9a084f6e&version=stable&mode=debug&edition=2015 emits no warnings today.
I'm not sure if this should be a new lint or part of the existing overflowing_literals lint. It obviously "feels" like the same sort of issue, and it's hard to imagine a situation where you'd want to allow/deny/forbid this and not the other kinds of overflowing_literals. But it's also clearly not "overflowing" in the usual sense of being an unrepresentable value greater than MAX or less than MIN, rather it's an unrepresentable value in-between multiple representable values.
(thought of this when reading #51534 (comment))
4444444444_f32is actually the number4444444700becausef32doesn't have enough bits to represent4444444444. This seems like an obvious thing we should be linting against, but http://play.rust-lang.org/?gist=3e360c4ab4deb3ef9cc16b9c9a084f6e&version=stable&mode=debug&edition=2015 emits no warnings today.I'm not sure if this should be a new lint or part of the existing
overflowing_literalslint. It obviously "feels" like the same sort of issue, and it's hard to imagine a situation where you'd want to allow/deny/forbid this and not the other kinds ofoverflowing_literals. But it's also clearly not "overflowing" in the usual sense of being an unrepresentable value greater than MAX or less than MIN, rather it's an unrepresentable value in-between multiple representable values.(thought of this when reading #51534 (comment))