From aefab0ef386c3558e6cf759984ca338f384d752e Mon Sep 17 00:00:00 2001 From: pmk21 Date: Thu, 9 Apr 2020 20:16:44 +0530 Subject: [PATCH] Reduce stderr size --- tests/ui/implicit_saturating_sub.rs | 25 -------------- tests/ui/implicit_saturating_sub.stderr | 46 ++----------------------- 2 files changed, 3 insertions(+), 68 deletions(-) diff --git a/tests/ui/implicit_saturating_sub.rs b/tests/ui/implicit_saturating_sub.rs index 4949e4eac9a8..581aa5295791 100644 --- a/tests/ui/implicit_saturating_sub.rs +++ b/tests/ui/implicit_saturating_sub.rs @@ -177,31 +177,6 @@ fn main() { let mut i_64: i64 = endi_64 - starti_64; - // Lint - if i_64 > i64::MIN { - i_64 -= 1; - } - - // Lint - if i_64 > i64::min_value() { - i_64 -= 1; - } - - // Lint - if i_64 != i64::MIN { - i_64 -= 1; - } - - // Lint - if i_64 != i64::min_value() { - i_64 -= 1; - } - - // Lint - if i64::min_value() != i_64 { - i_64 -= 1; - } - // Lint if i64::min_value() < i_64 { i_64 -= 1; diff --git a/tests/ui/implicit_saturating_sub.stderr b/tests/ui/implicit_saturating_sub.stderr index 2bcc63a1b1e7..c3cce9a8d90c 100644 --- a/tests/ui/implicit_saturating_sub.stderr +++ b/tests/ui/implicit_saturating_sub.stderr @@ -163,53 +163,13 @@ LL | | } error: Implicitly performing saturating subtraction --> $DIR/implicit_saturating_sub.rs:181:5 | -LL | / if i_64 > i64::MIN { -LL | | i_64 -= 1; -LL | | } - | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` - -error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:186:5 - | -LL | / if i_64 > i64::min_value() { -LL | | i_64 -= 1; -LL | | } - | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` - -error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:191:5 - | -LL | / if i_64 != i64::MIN { -LL | | i_64 -= 1; -LL | | } - | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` - -error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:196:5 - | -LL | / if i_64 != i64::min_value() { -LL | | i_64 -= 1; -LL | | } - | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` - -error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:201:5 - | -LL | / if i64::min_value() != i_64 { -LL | | i_64 -= 1; -LL | | } - | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` - -error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:206:5 - | LL | / if i64::min_value() < i_64 { LL | | i_64 -= 1; LL | | } | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:211:5 + --> $DIR/implicit_saturating_sub.rs:186:5 | LL | / if i64::MIN != i_64 { LL | | i_64 -= 1; @@ -217,12 +177,12 @@ LL | | } | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` error: Implicitly performing saturating subtraction - --> $DIR/implicit_saturating_sub.rs:216:5 + --> $DIR/implicit_saturating_sub.rs:191:5 | LL | / if i64::MIN < i_64 { LL | | i_64 -= 1; LL | | } | |_____^ help: try: `i_64 = i_64.saturating_sub(1);` -error: aborting due to 28 previous errors +error: aborting due to 23 previous errors