2018-02-08 13:26:50 -06:00
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:29:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
29 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
30 | | Foo { bar: 42 };
|
|
|
|
31 | | 0..10;
|
|
|
|
32 | | ..;
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
36 | | foo();
|
|
|
|
37 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: `-D if-same-then-else` implied by `-D warnings`
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:20:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
20 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
21 | | Foo { bar: 42 };
|
|
|
|
22 | | 0..10;
|
|
|
|
23 | | ..;
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
27 | | foo();
|
|
|
|
28 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:78:14
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
78 | _ => { //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ______________^
|
2018-03-16 03:44:20 -05:00
|
|
|
79 | | foo();
|
|
|
|
80 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
81 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
85 | | a
|
|
|
|
86 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_________^
|
|
|
|
|
|
|
|
|
= note: `-D match-same-arms` implied by `-D warnings`
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:69:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
69 | 42 => {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _______________^
|
2018-03-16 03:44:20 -05:00
|
|
|
70 | | foo();
|
|
|
|
71 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
72 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
76 | | a
|
|
|
|
77 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_________^
|
|
|
|
note: `42` has the same arm body as the `_` wildcard, consider removing it`
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:69:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
69 | 42 => {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _______________^
|
2018-03-16 03:44:20 -05:00
|
|
|
70 | | foo();
|
|
|
|
71 | | let mut a = 42 + [23].len() as i32;
|
|
|
|
72 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
76 | | a
|
|
|
|
77 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:92:14
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
92 | _ => 0, //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:90:19
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
90 | 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-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:90:19
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
90 | Abc::A => 0,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:102:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
102 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
103 | | 42
|
|
|
|
104 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:99:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
99 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-03-16 03:44:20 -05:00
|
|
|
100 | | 42
|
|
|
|
101 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:116:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
116 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
117 | | for _ in &[42] {
|
|
|
|
118 | | let foo: &Option<_> = &Some::<u8>(42);
|
|
|
|
119 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
124 | | }
|
|
|
|
125 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:106:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
106 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
107 | | for _ in &[42] {
|
|
|
|
108 | | let foo: &Option<_> = &Some::<u8>(42);
|
|
|
|
109 | | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
114 | | }
|
|
|
|
115 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:138:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
138 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
139 | | let bar = if true {
|
|
|
|
140 | | 42
|
|
|
|
141 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
147 | | bar + 1;
|
|
|
|
148 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:127:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
127 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
128 | | let bar = if true {
|
|
|
|
129 | | 42
|
|
|
|
130 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
... |
|
2018-03-16 03:44:20 -05:00
|
|
|
136 | | bar + 1;
|
|
|
|
137 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:173:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
173 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
174 | | if let Some(a) = Some(42) {}
|
|
|
|
175 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:170:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
170 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
171 | | if let Some(a) = Some(42) {}
|
|
|
|
172 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:180:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
180 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
181 | | if let (1, .., 3) = (1, 2, 3) {}
|
|
|
|
182 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:177:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
177 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
178 | | if let (1, .., 3) = (1, 2, 3) {}
|
|
|
|
179 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:235:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
235 | 51 => foo(), //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:234:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
234 | 42 => foo(),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^
|
|
|
|
note: consider refactoring into `42 | 51`
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:234:15
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
234 | 42 => foo(),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:241:17
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
241 | None => 24, //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:240:20
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
240 | Some(_) => 24,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
note: consider refactoring into `Some(_) | None`
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:240:20
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
240 | Some(_) => 24,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:263:28
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
263 | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:262:28
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
262 | (Some(a), None) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
note: consider refactoring into `(Some(a), None) | (None, Some(a))`
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:262:28
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
262 | (Some(a), None) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:269:26
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
269 | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:268:26
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
268 | (Some(a), ..) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:268:26
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
268 | (Some(a), ..) => bar(a),
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:275:20
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
275 | (.., 3) => 42, //~ ERROR match arms have same body
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:274:23
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
274 | (1, .., 3) => 42,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
note: consider refactoring into `(1, .., 3) | (.., 3)`
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:274:23
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
274 | (1, .., 3) => 42,
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:281:12
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
281 | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| ____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
282 | | 0.0
|
|
|
|
283 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:279:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
279 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-03-16 03:44:20 -05:00
|
|
|
280 | | 0.0
|
|
|
|
281 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:287:12
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
287 | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| ____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
288 | | -0.0
|
|
|
|
289 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:285:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
285 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-03-16 03:44:20 -05:00
|
|
|
286 | | -0.0
|
|
|
|
287 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:307:12
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
307 | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| ____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
308 | | std::f32::NAN
|
|
|
|
309 | | };
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:305:21
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
305 | let _ = if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________________^
|
2018-03-16 03:44:20 -05:00
|
|
|
306 | | std::f32::NAN
|
|
|
|
307 | | } else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has identical blocks
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:325:10
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
325 | else { //~ ERROR same body as `if` block
|
2018-02-08 13:26:50 -06:00
|
|
|
| __________^
|
2018-03-16 03:44:20 -05:00
|
|
|
326 | | try!(Ok("foo"));
|
|
|
|
327 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:322:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
322 | if true {
|
2018-02-08 13:26:50 -06:00
|
|
|
| _____________^
|
2018-03-16 03:44:20 -05:00
|
|
|
323 | | try!(Ok("foo"));
|
|
|
|
324 | | }
|
2018-02-08 13:26:50 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:351:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
351 | else if b { //~ ERROR ifs same condition
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= note: `-D ifs-same-cond` implied by `-D warnings`
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:349:8
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
349 | if b {
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:356:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
356 | else if a == 1 { //~ ERROR ifs same condition
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:354:8
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
354 | if a == 1 {
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `if` has the same condition as a previous if
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:363:13
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
363 | else if 2*a == 1 { //~ ERROR ifs same condition
|
2018-02-08 13:26:50 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-03-16 03:44:20 -05:00
|
|
|
--> $DIR/copies.rs:359:8
|
2018-02-08 13:26:50 -06:00
|
|
|
|
|
2018-03-16 03:44:20 -05:00
|
|
|
359 | 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
|
|
|
|