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