2020-01-10 18:19:09 -06:00
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:4:7
|
|
|
|
|
|
|
|
|
LL | 1 < 2 <= 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^ ^^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 < 2 && 2 <= 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:9:7
|
|
|
|
|
|
|
|
|
LL | 1 < 2 < 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^ ^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 < 2 && 2 < 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:13:7
|
|
|
|
|
|
|
|
|
LL | 1 <= 2 < 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^^ ^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 <= 2 && 2 < 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:18:7
|
|
|
|
|
|
|
|
|
LL | 1 <= 2 <= 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^^ ^^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 <= 2 && 2 <= 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:23:7
|
|
|
|
|
|
|
|
|
LL | 1 > 2 >= 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^ ^^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 > 2 && 2 >= 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:28:7
|
|
|
|
|
|
|
|
|
LL | 1 > 2 > 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^ ^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 > 2 && 2 > 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:32:7
|
|
|
|
|
|
|
|
|
LL | 1 >= 2 > 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^^ ^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 >= 2 && 2 > 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:36:7
|
|
|
|
|
|
|
|
|
LL | 1 >= 2 >= 3;
|
2020-03-09 22:21:37 -05:00
|
|
|
| ^^ ^^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: split the comparison into two
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
|
LL | 1 >= 2 && 2 >= 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-03-09 22:21:37 -05:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:41:7
|
|
|
|
|
|
|
|
|
LL | 1 == 2 < 3;
|
|
|
|
| ^^ ^
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
help: parenthesize the comparison
|
|
|
|
|
|
|
|
|
LL | 1 == (2 < 3);
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-03-09 22:21:37 -05:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:45:7
|
|
|
|
|
|
|
|
|
LL | 1 > 2 == false;
|
|
|
|
| ^ ^^
|
|
|
|
|
|
|
|
|
help: parenthesize the comparison
|
|
|
|
|
|
|
|
|
LL | (1 > 2) == false;
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-03-09 22:21:37 -05:00
|
|
|
|
|
|
|
error: comparison operators cannot be chained
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:49:7
|
|
|
|
|
|
|
|
|
LL | 1 == 2 == 3;
|
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
|
help: split the comparison into two
|
|
|
|
|
|
|
|
|
LL | 1 == 2 && 2 == 3;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:4:14
|
|
|
|
|
|
|
|
|
LL | 1 < 2 <= 3;
|
2022-12-02 17:56:37 -06:00
|
|
|
| ----- ^ expected `bool`, found integer
|
|
|
|
| |
|
|
|
|
| expected because this is `bool`
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:13:14
|
|
|
|
|
|
|
|
|
LL | 1 <= 2 < 3;
|
2022-12-02 17:56:37 -06:00
|
|
|
| ------ ^ expected `bool`, found integer
|
|
|
|
| |
|
|
|
|
| expected because this is `bool`
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:18:15
|
|
|
|
|
|
|
|
|
LL | 1 <= 2 <= 3;
|
2022-12-02 17:56:37 -06:00
|
|
|
| ------ ^ expected `bool`, found integer
|
|
|
|
| |
|
|
|
|
| expected because this is `bool`
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:23:14
|
|
|
|
|
|
|
|
|
LL | 1 > 2 >= 3;
|
2022-12-02 17:56:37 -06:00
|
|
|
| ----- ^ expected `bool`, found integer
|
|
|
|
| |
|
|
|
|
| expected because this is `bool`
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:36:15
|
|
|
|
|
|
|
|
|
LL | 1 >= 2 >= 3;
|
2022-12-02 17:56:37 -06:00
|
|
|
| ------ ^ expected `bool`, found integer
|
|
|
|
| |
|
|
|
|
| expected because this is `bool`
|
2020-01-10 18:19:09 -06:00
|
|
|
|
2020-03-09 22:21:37 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/chained-comparison-suggestion.rs:49:15
|
|
|
|
|
|
|
|
|
LL | 1 == 2 == 3;
|
2022-12-02 17:56:37 -06:00
|
|
|
| ------ ^ expected `bool`, found integer
|
|
|
|
| |
|
|
|
|
| expected because this is `bool`
|
2020-03-09 22:21:37 -05:00
|
|
|
|
|
|
|
error: aborting due to 17 previous errors
|
2020-01-10 18:19:09 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|