2018-02-08 13:26:50 -06:00
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:31:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
31 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
32 | | Foo { bar: 42 };
|
|
|
|
33 | | 0..10;
|
|
|
|
34 | | ..;
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
38 | | foo();
|
|
|
|
39 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
|
2018-02-08 13:26:50 -06:00
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:22:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
22 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
23 | | Foo { bar: 42 };
|
|
|
|
24 | | 0..10;
|
|
|
|
25 | | ..;
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
29 | | foo();
|
|
|
|
30 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:80:14
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
80 | _ => { //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ______________^
|
2018-08-01 09:30:44 -05:00
|
|
|
81 | | foo();
|
|
|
|
82 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
83 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
87 | | a
|
|
|
|
88 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_________^
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::match-same-arms` implied by `-D warnings`
|
2018-02-08 13:26:50 -06:00
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:71:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
71 | 42 => {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _______________^
|
2018-08-01 09:30:44 -05:00
|
|
|
72 | | foo();
|
|
|
|
73 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
74 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
78 | | a
|
|
|
|
79 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_________^
|
|
|
|
note: `42` has the same arm body as the `_` wildcard, consider removing it`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:71:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
71 | 42 => {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _______________^
|
2018-08-01 09:30:44 -05:00
|
|
|
72 | | foo();
|
|
|
|
73 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
74 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
78 | | a
|
|
|
|
79 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:94:14
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
94 | _ => 0, //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:92:19
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
92 | Abc::A => 0,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:92:19
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
92 | Abc::A => 0,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:104:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
104 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
105 | | 42
|
|
|
|
106 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:101:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
101 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-08-01 09:30:44 -05:00
|
|
|
102 | | 42
|
|
|
|
103 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:118:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
118 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
119 | | for _ in &[42] {
|
|
|
|
120 | | let foo: &Option<_> = &Some::<u8>(42);
|
|
|
|
121 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
126 | | }
|
|
|
|
127 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:108:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
108 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
109 | | for _ in &[42] {
|
|
|
|
110 | | let foo: &Option<_> = &Some::<u8>(42);
|
|
|
|
111 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
116 | | }
|
|
|
|
117 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:140:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
140 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
141 | | let bar = if true {
|
|
|
|
142 | | 42
|
|
|
|
143 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
149 | | bar + 1;
|
|
|
|
150 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:129:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
129 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
130 | | let bar = if true {
|
|
|
|
131 | | 42
|
|
|
|
132 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-08-01 09:30:44 -05:00
|
|
|
138 | | bar + 1;
|
|
|
|
139 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:175:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
175 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
176 | | if let Some(a) = Some(42) {}
|
|
|
|
177 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:172:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
172 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
173 | | if let Some(a) = Some(42) {}
|
|
|
|
174 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:182:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
182 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
183 | | if let (1, .., 3) = (1, 2, 3) {}
|
|
|
|
184 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:179:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
179 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
180 | | if let (1, .., 3) = (1, 2, 3) {}
|
|
|
|
181 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:237:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
237 | 51 => foo(), //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:236:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
236 | 42 => foo(),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^
|
|
|
|
note: consider refactoring into `42 | 51`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:236:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
236 | 42 => foo(),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:243:17
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
243 | None => 24, //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:242:20
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
242 | Some(_) => 24,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
note: consider refactoring into `Some(_) | None`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:242:20
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
242 | Some(_) => 24,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:265:28
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
265 | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:264:28
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
264 | (Some(a), None) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
note: consider refactoring into `(Some(a), None) | (None, Some(a))`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:264:28
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
264 | (Some(a), None) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:271:26
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
271 | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:270:26
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
270 | (Some(a), ..) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:270:26
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
270 | (Some(a), ..) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:277:20
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
277 | (.., 3) => 42, //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:276:23
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
276 | (1, .., 3) => 42,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
note: consider refactoring into `(1, .., 3) | (.., 3)`
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:276:23
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
276 | (1, .., 3) => 42,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:283:12
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
283 | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| ____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
284 | | 0.0
|
|
|
|
285 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:281:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
281 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-08-01 09:30:44 -05:00
|
|
|
282 | | 0.0
|
|
|
|
283 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:289:12
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
289 | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| ____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
290 | | -0.0
|
|
|
|
291 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:287:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
287 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-08-01 09:30:44 -05:00
|
|
|
288 | | -0.0
|
|
|
|
289 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:309:12
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
309 | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| ____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
310 | | std::f32::NAN
|
|
|
|
311 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:307:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
307 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-08-01 09:30:44 -05:00
|
|
|
308 | | std::f32::NAN
|
|
|
|
309 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:327:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
327 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-08-01 09:30:44 -05:00
|
|
|
328 | | try!(Ok("foo"));
|
|
|
|
329 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:324:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
324 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-08-01 09:30:44 -05:00
|
|
|
325 | | try!(Ok("foo"));
|
|
|
|
326 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:353:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
353 | else if b { //~ ERROR ifs same condition
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::ifs-same-cond` implied by `-D warnings`
|
2018-02-08 13:26:50 -06:00
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:351:8
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
351 | if b {
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:358:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
358 | else if a == 1 { //~ ERROR ifs same condition
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:356:8
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
356 | if a == 1 {
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:365:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
365 | else if 2*a == 1 { //~ ERROR ifs same condition
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-08-01 09:30:44 -05:00
|
|
|
--> $DIR/copies.rs:361:8
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
361 | if 2*a == 1 {
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
2018-02-09 08:23:51 -06:00
|
|
|
error: aborting due to 20 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|