From 370433f6339856a2863ae85b98b6c2b09813a17a Mon Sep 17 00:00:00 2001 From: Jamie McClymont Date: Mon, 19 Aug 2019 20:22:42 +1200 Subject: [PATCH] Requested test cleanup --- tests/ui/literals.rs | 11 +-------- tests/ui/literals.stderr | 50 +++++----------------------------------- 2 files changed, 7 insertions(+), 54 deletions(-) diff --git a/tests/ui/literals.rs b/tests/ui/literals.rs index 5f3f95bab98..be1d2ed2f4d 100644 --- a/tests/ui/literals.rs +++ b/tests/ui/literals.rs @@ -1,7 +1,7 @@ #![warn(clippy::large_digit_groups)] #![warn(clippy::mixed_case_hex_literals)] -#![warn(clippy::unseparated_literal_suffix)] #![warn(clippy::zero_prefixed_literal)] +#![allow(clippy::unseparated_literal_suffix)] #![allow(dead_code)] fn main() { @@ -15,15 +15,6 @@ fn main() { let fail2 = 0xabCD_isize; let fail_multi_zero = 000_123usize; - let ok6 = 1234_i32; - let ok7 = 1234_f32; - let ok8 = 1234_isize; - let fail3 = 1234i32; - let fail4 = 1234u32; - let fail5 = 1234isize; - let fail6 = 1234usize; - let fail7 = 1.5f32; - let ok9 = 0; let ok10 = 0_i64; let fail8 = 0123; diff --git a/tests/ui/literals.stderr b/tests/ui/literals.stderr index c140bd88e81..4f3d430c4d9 100644 --- a/tests/ui/literals.stderr +++ b/tests/ui/literals.stderr @@ -18,14 +18,6 @@ error: inconsistent casing in hexadecimal literal LL | let fail2 = 0xabCD_isize; | ^^^^^^^^^^^^ -error: integer type suffix should be separated by an underscore - --> $DIR/literals.rs:16:27 - | -LL | let fail_multi_zero = 000_123usize; - | ^^^^^^^^^^^^ help: add an underscore: `000_123_usize` - | - = note: `-D clippy::unseparated-literal-suffix` implied by `-D warnings` - error: this is a decimal constant --> $DIR/literals.rs:16:27 | @@ -42,38 +34,8 @@ help: if you mean to use an octal constant, use `0o` LL | let fail_multi_zero = 0o123usize; | ^^^^^^^^^^ -error: integer type suffix should be separated by an underscore - --> $DIR/literals.rs:21:17 - | -LL | let fail3 = 1234i32; - | ^^^^^^^ help: add an underscore: `1234_i32` - -error: integer type suffix should be separated by an underscore - --> $DIR/literals.rs:22:17 - | -LL | let fail4 = 1234u32; - | ^^^^^^^ help: add an underscore: `1234_u32` - -error: integer type suffix should be separated by an underscore - --> $DIR/literals.rs:23:17 - | -LL | let fail5 = 1234isize; - | ^^^^^^^^^ help: add an underscore: `1234_isize` - -error: integer type suffix should be separated by an underscore - --> $DIR/literals.rs:24:17 - | -LL | let fail6 = 1234usize; - | ^^^^^^^^^ help: add an underscore: `1234_usize` - -error: float type suffix should be separated by an underscore - --> $DIR/literals.rs:25:17 - | -LL | let fail7 = 1.5f32; - | ^^^^^^ help: add an underscore: `1.5_f32` - error: this is a decimal constant - --> $DIR/literals.rs:29:17 + --> $DIR/literals.rs:20:17 | LL | let fail8 = 0123; | ^^^^ @@ -87,7 +49,7 @@ LL | let fail8 = 0o123; | ^^^^^ error: digit groups should be smaller - --> $DIR/literals.rs:40:18 + --> $DIR/literals.rs:31:18 | LL | let fail13 = 0x1_23456_78901_usize; | ^^^^^^^^^^^^^^^^^^^^^ help: consider: `0x0123_4567_8901_usize` @@ -95,7 +57,7 @@ LL | let fail13 = 0x1_23456_78901_usize; = note: `-D clippy::large-digit-groups` implied by `-D warnings` error: digits grouped inconsistently by underscores - --> $DIR/literals.rs:42:18 + --> $DIR/literals.rs:33:18 | LL | let fail19 = 12_3456_21; | ^^^^^^^^^^ help: consider: `12_345_621` @@ -103,16 +65,16 @@ LL | let fail19 = 12_3456_21; = note: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings` error: digits grouped inconsistently by underscores - --> $DIR/literals.rs:43:18 + --> $DIR/literals.rs:34:18 | LL | let fail22 = 3__4___23; | ^^^^^^^^^ help: consider: `3_423` error: digits grouped inconsistently by underscores - --> $DIR/literals.rs:44:18 + --> $DIR/literals.rs:35:18 | LL | let fail23 = 3__16___23; | ^^^^^^^^^^ help: consider: `31_623` -error: aborting due to 15 previous errors +error: aborting due to 9 previous errors