]> git.lizzy.rs Git - rust.git/blob - tests/ui/branches_sharing_code/valid_if_blocks.stderr
Rollup merge of #92849 - flip1995:clippyup, r=Manishearth
[rust.git] / tests / ui / branches_sharing_code / valid_if_blocks.stderr
1 error: this `if` has identical blocks
2   --> $DIR/valid_if_blocks.rs:104:14
3    |
4 LL |       if false {
5    |  ______________^
6 LL | |     } else {
7    | |_____^
8    |
9 note: the lint level is defined here
10   --> $DIR/valid_if_blocks.rs:2:9
11    |
12 LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)]
13    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
14 note: same as this
15   --> $DIR/valid_if_blocks.rs:105:12
16    |
17 LL |       } else {
18    |  ____________^
19 LL | |     }
20    | |_____^
21
22 error: this `if` has identical blocks
23   --> $DIR/valid_if_blocks.rs:115:15
24    |
25 LL |       if x == 0 {
26    |  _______________^
27 LL | |         let u = 19;
28 LL | |         println!("How are u today?");
29 LL | |         let _ = "This is a string";
30 LL | |     } else {
31    | |_____^
32    |
33 note: same as this
34   --> $DIR/valid_if_blocks.rs:119:12
35    |
36 LL |       } else {
37    |  ____________^
38 LL | |         let u = 19;
39 LL | |         println!("How are u today?");
40 LL | |         let _ = "This is a string";
41 LL | |     }
42    | |_____^
43
44 error: this `if` has identical blocks
45   --> $DIR/valid_if_blocks.rs:126:23
46    |
47 LL |     let _ = if x == 6 { 7 } else { 7 };
48    |                       ^^^^^
49    |
50 note: same as this
51   --> $DIR/valid_if_blocks.rs:126:34
52    |
53 LL |     let _ = if x == 6 { 7 } else { 7 };
54    |                                  ^^^^^
55
56 error: this `if` has identical blocks
57   --> $DIR/valid_if_blocks.rs:132:23
58    |
59 LL |       } else if x == 68 {
60    |  _______________________^
61 LL | |         println!("I'm a doppelgänger");
62 LL | |         // Don't listen to my clone below
63 LL | |
64 LL | |         if y == 90 { "=^.^=" } else { ":D" }
65 LL | |     } else {
66    | |_____^
67    |
68 note: same as this
69   --> $DIR/valid_if_blocks.rs:137:12
70    |
71 LL |       } else {
72    |  ____________^
73 LL | |         // Don't listen to my clone above
74 LL | |         println!("I'm a doppelgänger");
75 LL | |
76 LL | |         if y == 90 { "=^.^=" } else { ":D" }
77 LL | |     };
78    | |_____^
79
80 error: this `if` has identical blocks
81   --> $DIR/valid_if_blocks.rs:146:23
82    |
83 LL |       } else if x == 68 {
84    |  _______________________^
85 LL | |         println!("I'm a doppelgänger");
86 LL | |         // Don't listen to my clone below
87 LL | |     } else {
88    | |_____^
89    |
90 note: same as this
91   --> $DIR/valid_if_blocks.rs:149:12
92    |
93 LL |       } else {
94    |  ____________^
95 LL | |         // Don't listen to my clone above
96 LL | |         println!("I'm a doppelgänger");
97 LL | |     }
98    | |_____^
99
100 error: aborting due to 5 previous errors
101