summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unreadable_literal.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/unreadable_literal.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/unreadable_literal.stderr')
-rw-r--r--src/tools/clippy/tests/ui/unreadable_literal.stderr72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/unreadable_literal.stderr b/src/tools/clippy/tests/ui/unreadable_literal.stderr
new file mode 100644
index 000000000..b51130c6a
--- /dev/null
+++ b/src/tools/clippy/tests/ui/unreadable_literal.stderr
@@ -0,0 +1,72 @@
+error: digits of hex or binary literal not grouped by four
+ --> $DIR/unreadable_literal.rs:26:9
+ |
+LL | 0x1_234_567,
+ | ^^^^^^^^^^^ help: consider: `0x0123_4567`
+ |
+ = note: `-D clippy::unusual-byte-groupings` implied by `-D warnings`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:34:17
+ |
+LL | let _bad = (0b110110_i64, 0x12345678_usize, 123456_f32, 1.234567_f32);
+ | ^^^^^^^^^^^^ help: consider: `0b11_0110_i64`
+ |
+ = note: `-D clippy::unreadable-literal` implied by `-D warnings`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:34:31
+ |
+LL | let _bad = (0b110110_i64, 0x12345678_usize, 123456_f32, 1.234567_f32);
+ | ^^^^^^^^^^^^^^^^ help: consider: `0x1234_5678_usize`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:34:49
+ |
+LL | let _bad = (0b110110_i64, 0x12345678_usize, 123456_f32, 1.234567_f32);
+ | ^^^^^^^^^^ help: consider: `123_456_f32`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:34:61
+ |
+LL | let _bad = (0b110110_i64, 0x12345678_usize, 123456_f32, 1.234567_f32);
+ | ^^^^^^^^^^^^ help: consider: `1.234_567_f32`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:36:20
+ |
+LL | let _bad_sci = 1.123456e1;
+ | ^^^^^^^^^^ help: consider: `1.123_456e1`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:38:18
+ |
+LL | let _fail1 = 0xabcdef;
+ | ^^^^^^^^ help: consider: `0x00ab_cdef`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:39:23
+ |
+LL | let _fail2: u32 = 0xBAFEBAFE;
+ | ^^^^^^^^^^ help: consider: `0xBAFE_BAFE`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:40:18
+ |
+LL | let _fail3 = 0xabcdeff;
+ | ^^^^^^^^^ help: consider: `0x0abc_deff`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:41:24
+ |
+LL | let _fail4: i128 = 0xabcabcabcabcabcabc;
+ | ^^^^^^^^^^^^^^^^^^^^ help: consider: `0x00ab_cabc_abca_bcab_cabc`
+
+error: long literal lacking separators
+ --> $DIR/unreadable_literal.rs:42:18
+ |
+LL | let _fail5 = 1.100300400;
+ | ^^^^^^^^^^^ help: consider: `1.100_300_400`
+
+error: aborting due to 11 previous errors
+