rust-clippy/tests/ui/inconsistent_digit_grouping.stderr
Michael Wright 75e2dcf56b literal representation: simplification
Simplify calculation in grouping. Add test case to ensure `count()`
can't be zero in that branch.
2019-11-14 07:42:04 +02:00

66 lines
2.4 KiB
Text

error: digits grouped inconsistently by underscores
--> $DIR/inconsistent_digit_grouping.rs:14:16
|
LL | let bad = (1_23_456, 1_234_5678, 1234_567, 1_234.5678_f32, 1.234_5678_f32);
| ^^^^^^^^ help: consider: `123_456`
|
= note: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings`
error: digits grouped inconsistently by underscores
--> $DIR/inconsistent_digit_grouping.rs:14:26
|
LL | let bad = (1_23_456, 1_234_5678, 1234_567, 1_234.5678_f32, 1.234_5678_f32);
| ^^^^^^^^^^ help: consider: `12_345_678`
error: digits grouped inconsistently by underscores
--> $DIR/inconsistent_digit_grouping.rs:14:38
|
LL | let bad = (1_23_456, 1_234_5678, 1234_567, 1_234.5678_f32, 1.234_5678_f32);
| ^^^^^^^^ help: consider: `1_234_567`
error: digits grouped inconsistently by underscores
--> $DIR/inconsistent_digit_grouping.rs:14:48
|
LL | let bad = (1_23_456, 1_234_5678, 1234_567, 1_234.5678_f32, 1.234_5678_f32);
| ^^^^^^^^^^^^^^ help: consider: `1_234.567_8_f32`
error: digits grouped inconsistently by underscores
--> $DIR/inconsistent_digit_grouping.rs:14:64
|
LL | let bad = (1_23_456, 1_234_5678, 1234_567, 1_234.5678_f32, 1.234_5678_f32);
| ^^^^^^^^^^^^^^ help: consider: `1.234_567_8_f32`
error: long literal lacking separators
--> $DIR/inconsistent_digit_grouping.rs:17:13
|
LL | let _ = 0x100000;
| ^^^^^^^^ help: consider: `0x0010_0000`
|
= note: `-D clippy::unreadable-literal` implied by `-D warnings`
error: long literal lacking separators
--> $DIR/inconsistent_digit_grouping.rs:18:13
|
LL | let _ = 0x1000000;
| ^^^^^^^^^ help: consider: `0x0100_0000`
error: long literal lacking separators
--> $DIR/inconsistent_digit_grouping.rs:19:13
|
LL | let _ = 0x10000000;
| ^^^^^^^^^^ help: consider: `0x1000_0000`
error: long literal lacking separators
--> $DIR/inconsistent_digit_grouping.rs:20:13
|
LL | let _ = 0x100000000_u64;
| ^^^^^^^^^^^^^^^ help: consider: `0x0001_0000_0000_u64`
error: digits grouped inconsistently by underscores
--> $DIR/inconsistent_digit_grouping.rs:23:18
|
LL | let _: f32 = 1_23_456.;
| ^^^^^^^^^ help: consider: `123_456.`
error: aborting due to 10 previous errors