2018-02-08 19:26:50 +00:00
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:41:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
41 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
42 | | Foo { bar: 42 };
|
|
|
|
43 | | 0..10;
|
|
|
|
44 | | ..;
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
48 | | foo();
|
|
|
|
49 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
|
2018-02-08 19:26:50 +00:00
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:32:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
32 | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
33 | | Foo { bar: 42 };
|
|
|
|
34 | | 0..10;
|
|
|
|
35 | | ..;
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
39 | | foo();
|
|
|
|
40 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:90:14
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
90 | _ => { //~ ERROR match arms have same body
|
2018-02-08 19:26:50 +00:00
|
|
|
| ______________^
|
2018-10-06 16:18:06 +00:00
|
|
|
91 | | foo();
|
|
|
|
92 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
93 | | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
97 | | a
|
|
|
|
98 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_________^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::match-same-arms` implied by `-D warnings`
|
2018-02-08 19:26:50 +00:00
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:81:15
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
81 | 42 => {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _______________^
|
2018-10-06 16:18:06 +00:00
|
|
|
82 | | foo();
|
|
|
|
83 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
84 | | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
88 | | a
|
|
|
|
89 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_________^
|
|
|
|
note: `42` has the same arm body as the `_` wildcard, consider removing it`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:81:15
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
81 | 42 => {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _______________^
|
2018-10-06 16:18:06 +00:00
|
|
|
82 | | foo();
|
|
|
|
83 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
84 | | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
88 | | a
|
|
|
|
89 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:104:14
|
|
|
|
|
|
|
|
|
104 | _ => 0, //~ ERROR match arms have same body
|
|
|
|
| ^
|
|
|
|
|
|
2018-02-08 19:26:50 +00:00
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:102:19
|
|
|
|
|
|
|
|
|
102 | Abc::A => 0,
|
|
|
|
| ^
|
2018-02-08 19:26:50 +00:00
|
|
|
note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:102:19
|
|
|
|
|
|
|
|
|
102 | Abc::A => 0,
|
|
|
|
| ^
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:114:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
114 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
115 | | 42
|
|
|
|
116 | | };
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:111:21
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
111 | let _ = if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________________^
|
2018-10-06 16:18:06 +00:00
|
|
|
112 | | 42
|
|
|
|
113 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:128:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
128 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
129 | | for _ in &[42] {
|
|
|
|
130 | | let foo: &Option<_> = &Some::<u8>(42);
|
|
|
|
131 | | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
136 | | }
|
|
|
|
137 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:118:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
118 | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
119 | | for _ in &[42] {
|
|
|
|
120 | | let foo: &Option<_> = &Some::<u8>(42);
|
|
|
|
121 | | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
126 | | }
|
|
|
|
127 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:150:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
150 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
151 | | let bar = if true {
|
|
|
|
152 | | 42
|
|
|
|
153 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
159 | | bar + 1;
|
|
|
|
160 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:139:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
139 | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
140 | | let bar = if true {
|
|
|
|
141 | | 42
|
|
|
|
142 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
... |
|
2018-10-06 16:18:06 +00:00
|
|
|
148 | | bar + 1;
|
|
|
|
149 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:185:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
185 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
186 | | if let Some(a) = Some(42) {}
|
|
|
|
187 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:182:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
182 | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
183 | | if let Some(a) = Some(42) {}
|
|
|
|
184 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:192:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
192 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
193 | | if let (1, .., 3) = (1, 2, 3) {}
|
|
|
|
194 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:189:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
189 | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
190 | | if let (1, .., 3) = (1, 2, 3) {}
|
|
|
|
191 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:247:15
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
247 | 51 => foo(), //~ ERROR match arms have same body
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:246:15
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
246 | 42 => foo(),
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^
|
|
|
|
note: consider refactoring into `42 | 51`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:246:15
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
246 | 42 => foo(),
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:253:17
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
253 | None => 24, //~ ERROR match arms have same body
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:252:20
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
252 | Some(_) => 24,
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^
|
|
|
|
note: consider refactoring into `Some(_) | None`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:252:20
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
252 | Some(_) => 24,
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:275:28
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
275 | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:274:28
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
274 | (Some(a), None) => bar(a),
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
note: consider refactoring into `(Some(a), None) | (None, Some(a))`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:274:28
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
274 | (Some(a), None) => bar(a),
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:281:26
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
281 | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:280:26
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
280 | (Some(a), ..) => bar(a),
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:280:26
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
280 | (Some(a), ..) => bar(a),
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:287:20
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
287 | (.., 3) => 42, //~ ERROR match arms have same body
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:286:23
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
286 | (1, .., 3) => 42,
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^
|
|
|
|
note: consider refactoring into `(1, .., 3) | (.., 3)`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:286:23
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
286 | (1, .., 3) => 42,
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:293:12
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
293 | } else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| ____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
294 | | 0.0
|
|
|
|
295 | | };
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:291:21
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
291 | let _ = if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________________^
|
2018-10-06 16:18:06 +00:00
|
|
|
292 | | 0.0
|
|
|
|
293 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:299:12
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
299 | } else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| ____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
300 | | -0.0
|
|
|
|
301 | | };
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:297:21
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
297 | let _ = if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________________^
|
2018-10-06 16:18:06 +00:00
|
|
|
298 | | -0.0
|
|
|
|
299 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:319:12
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
319 | } else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| ____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
320 | | std::f32::NAN
|
|
|
|
321 | | };
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:317:21
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
317 | let _ = if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________________^
|
2018-10-06 16:18:06 +00:00
|
|
|
318 | | std::f32::NAN
|
|
|
|
319 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:337:10
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
337 | else { //~ ERROR same body as `if` block
|
2018-02-08 19:26:50 +00:00
|
|
|
| __________^
|
2018-10-06 16:18:06 +00:00
|
|
|
338 | | try!(Ok("foo"));
|
|
|
|
339 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:334:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
334 | if true {
|
2018-02-08 19:26:50 +00:00
|
|
|
| _____________^
|
2018-10-06 16:18:06 +00:00
|
|
|
335 | | try!(Ok("foo"));
|
|
|
|
336 | | }
|
2018-02-08 19:26:50 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:363:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
363 | else if b { //~ ERROR ifs same condition
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::ifs-same-cond` implied by `-D warnings`
|
2018-02-08 19:26:50 +00:00
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:361:8
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
361 | if b {
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:368:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
368 | else if a == 1 { //~ ERROR ifs same condition
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:366:8
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
366 | if a == 1 {
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:375:13
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
375 | else if 2*a == 1 { //~ ERROR ifs same condition
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/copies.rs:371:8
|
2018-02-08 19:26:50 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
371 | if 2*a == 1 {
|
2018-02-08 19:26:50 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
2018-02-09 14:23:51 +00:00
|
|
|
error: aborting due to 20 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|