From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/clippy/tests/ui/comparison_chain.stderr | 35 ++++++++++++----------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'src/tools/clippy/tests/ui/comparison_chain.stderr') diff --git a/src/tools/clippy/tests/ui/comparison_chain.stderr b/src/tools/clippy/tests/ui/comparison_chain.stderr index 2eeb50202..3b41dcf55 100644 --- a/src/tools/clippy/tests/ui/comparison_chain.stderr +++ b/src/tools/clippy/tests/ui/comparison_chain.stderr @@ -2,6 +2,7 @@ error: `if` chain can be rewritten with `match` --> $DIR/comparison_chain.rs:14:5 | LL | / if x > y { +LL | | LL | | a() LL | | } else if x < y { LL | | b() @@ -10,15 +11,16 @@ LL | | } | = help: consider rewriting the `if` chain to use `cmp` and `match` = note: `-D clippy::comparison-chain` implied by `-D warnings` + = help: to override `-D warnings` add `#[allow(clippy::comparison_chain)]` error: `if` chain can be rewritten with `match` - --> $DIR/comparison_chain.rs:27:5 + --> $DIR/comparison_chain.rs:28:5 | LL | / if x > y { +LL | | LL | | a() LL | | } else if x < y { -LL | | b() -LL | | } else { +... | LL | | c() LL | | } | |_____^ @@ -26,13 +28,13 @@ LL | | } = help: consider rewriting the `if` chain to use `cmp` and `match` error: `if` chain can be rewritten with `match` - --> $DIR/comparison_chain.rs:35:5 + --> $DIR/comparison_chain.rs:37:5 | LL | / if x > y { +LL | | LL | | a() LL | | } else if y > x { -LL | | b() -LL | | } else { +... | LL | | c() LL | | } | |_____^ @@ -40,13 +42,13 @@ LL | | } = help: consider rewriting the `if` chain to use `cmp` and `match` error: `if` chain can be rewritten with `match` - --> $DIR/comparison_chain.rs:43:5 + --> $DIR/comparison_chain.rs:46:5 | LL | / if x > 1 { +LL | | LL | | a() LL | | } else if x < 1 { -LL | | b() -LL | | } else if x == 1 { +... | LL | | c() LL | | } | |_____^ @@ -54,9 +56,10 @@ LL | | } = help: consider rewriting the `if` chain to use `cmp` and `match` error: `if` chain can be rewritten with `match` - --> $DIR/comparison_chain.rs:117:5 + --> $DIR/comparison_chain.rs:121:5 | LL | / if x > y { +LL | | LL | | a() LL | | } else if x < y { LL | | b() @@ -66,13 +69,13 @@ LL | | } = help: consider rewriting the `if` chain to use `cmp` and `match` error: `if` chain can be rewritten with `match` - --> $DIR/comparison_chain.rs:123:5 + --> $DIR/comparison_chain.rs:128:5 | LL | / if x > y { +LL | | LL | | a() LL | | } else if x < y { -LL | | b() -LL | | } else { +... | LL | | c() LL | | } | |_____^ @@ -80,13 +83,13 @@ LL | | } = help: consider rewriting the `if` chain to use `cmp` and `match` error: `if` chain can be rewritten with `match` - --> $DIR/comparison_chain.rs:131:5 + --> $DIR/comparison_chain.rs:137:5 | LL | / if x > y { +LL | | LL | | a() LL | | } else if y > x { -LL | | b() -LL | | } else { +... | LL | | c() LL | | } | |_____^ -- cgit v1.2.3