summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/needless_bool/simple.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/needless_bool/simple.stderr')
-rw-r--r--src/tools/clippy/tests/ui/needless_bool/simple.stderr44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/needless_bool/simple.stderr b/src/tools/clippy/tests/ui/needless_bool/simple.stderr
new file mode 100644
index 000000000..0ccc9416b
--- /dev/null
+++ b/src/tools/clippy/tests/ui/needless_bool/simple.stderr
@@ -0,0 +1,44 @@
+error: this if-then-else expression will always return true
+ --> $DIR/simple.rs:14:5
+ |
+LL | / if x {
+LL | | true
+LL | | } else {
+LL | | true
+LL | | };
+ | |_____^
+ |
+ = note: `-D clippy::needless-bool` implied by `-D warnings`
+
+error: this if-then-else expression will always return false
+ --> $DIR/simple.rs:19:5
+ |
+LL | / if x {
+LL | | false
+LL | | } else {
+LL | | false
+LL | | };
+ | |_____^
+
+error: this if-then-else expression will always return true
+ --> $DIR/simple.rs:34:5
+ |
+LL | / if x {
+LL | | return true;
+LL | | } else {
+LL | | return true;
+LL | | };
+ | |_____^
+
+error: this if-then-else expression will always return false
+ --> $DIR/simple.rs:42:5
+ |
+LL | / if x {
+LL | | return false;
+LL | | } else {
+LL | | return false;
+LL | | };
+ | |_____^
+
+error: aborting due to 4 previous errors
+