summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/same_functions_in_if_condition.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/same_functions_in_if_condition.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/same_functions_in_if_condition.stderr')
-rw-r--r--src/tools/clippy/tests/ui/same_functions_in_if_condition.stderr75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/same_functions_in_if_condition.stderr b/src/tools/clippy/tests/ui/same_functions_in_if_condition.stderr
new file mode 100644
index 000000000..71e82910e
--- /dev/null
+++ b/src/tools/clippy/tests/ui/same_functions_in_if_condition.stderr
@@ -0,0 +1,75 @@
+error: this `if` has the same function call as a previous `if`
+ --> $DIR/same_functions_in_if_condition.rs:31:15
+ |
+LL | } else if function() {
+ | ^^^^^^^^^^
+ |
+ = note: `-D clippy::same-functions-in-if-condition` implied by `-D warnings`
+note: same as this
+ --> $DIR/same_functions_in_if_condition.rs:30:8
+ |
+LL | if function() {
+ | ^^^^^^^^^^
+
+error: this `if` has the same function call as a previous `if`
+ --> $DIR/same_functions_in_if_condition.rs:36:15
+ |
+LL | } else if fn_arg(a) {
+ | ^^^^^^^^^
+ |
+note: same as this
+ --> $DIR/same_functions_in_if_condition.rs:35:8
+ |
+LL | if fn_arg(a) {
+ | ^^^^^^^^^
+
+error: this `if` has the same function call as a previous `if`
+ --> $DIR/same_functions_in_if_condition.rs:41:15
+ |
+LL | } else if obj.method() {
+ | ^^^^^^^^^^^^
+ |
+note: same as this
+ --> $DIR/same_functions_in_if_condition.rs:40:8
+ |
+LL | if obj.method() {
+ | ^^^^^^^^^^^^
+
+error: this `if` has the same function call as a previous `if`
+ --> $DIR/same_functions_in_if_condition.rs:46:15
+ |
+LL | } else if obj.method_arg(a) {
+ | ^^^^^^^^^^^^^^^^^
+ |
+note: same as this
+ --> $DIR/same_functions_in_if_condition.rs:45:8
+ |
+LL | if obj.method_arg(a) {
+ | ^^^^^^^^^^^^^^^^^
+
+error: this `if` has the same function call as a previous `if`
+ --> $DIR/same_functions_in_if_condition.rs:53:15
+ |
+LL | } else if v.pop() == None {
+ | ^^^^^^^^^^^^^^^
+ |
+note: same as this
+ --> $DIR/same_functions_in_if_condition.rs:51:8
+ |
+LL | if v.pop() == None {
+ | ^^^^^^^^^^^^^^^
+
+error: this `if` has the same function call as a previous `if`
+ --> $DIR/same_functions_in_if_condition.rs:58:15
+ |
+LL | } else if v.len() == 42 {
+ | ^^^^^^^^^^^^^
+ |
+note: same as this
+ --> $DIR/same_functions_in_if_condition.rs:56:8
+ |
+LL | if v.len() == 42 {
+ | ^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors
+