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
fnmain(){let a = 1.025_011_10E0;let b = 1.025_011_10_E0;println!("{}", a);println!("{}", b);}
I expected to see this happen: No warning is displayed for either literal.
Instead, this happened: A inconsistent_digit_grouping warning is displayed only for the literal assigned to b.
It looks like the final _ before the E binds to the fractional portion of the number rather than the exponent. It would be good if an _ before the E did not group with the fractional portion so that an _ can be used to make the E stand out from the digits.
Meta
cargo clippy -V: e.g. clippy 0.0.212 (f455e46 2020-06-20)
The
inconsistent_digit_grouping
is inconsistent when a floating point exponent is used. e.g.1.234E1
.https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c4df1f0f3ccc3411adf952eba66cf300
I expected to see this happen: No warning is displayed for either literal.
Instead, this happened: A
inconsistent_digit_grouping
warning is displayed only for the literal assigned tob
.It looks like the final
_
before theE
binds to the fractional portion of the number rather than the exponent. It would be good if an_
before theE
did not group with the fractional portion so that an_
can be used to make theE
stand out from the digits.Meta
cargo clippy -V
: e.g. clippy 0.0.212 (f455e46 2020-06-20)rustc -Vv
:The text was updated successfully, but these errors were encountered: