2020-01-11 00:19:09 +00:00
|
|
|
error: comparison operators cannot be chained
|
2022-01-13 23:44:17 +00:00
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:2:11
|
2018-10-20 20:36:17 +00:00
|
|
|
|
|
|
|
|
LL | false == false == false;
|
2020-03-10 03:21:37 +00:00
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
|
help: split the comparison into two
|
|
|
|
|
|
|
|
|
LL | false == false && false == false;
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++++++++
|
2018-10-20 20:36:17 +00:00
|
|
|
|
2020-01-11 00:19:09 +00:00
|
|
|
error: comparison operators cannot be chained
|
2022-01-13 23:44:17 +00:00
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:6:11
|
2018-10-20 20:36:17 +00:00
|
|
|
|
|
|
|
|
LL | false == 0 < 2;
|
2020-03-10 03:21:37 +00:00
|
|
|
| ^^ ^
|
|
|
|
|
|
|
|
|
help: parenthesize the comparison
|
|
|
|
|
|
|
|
|
LL | false == (0 < 2);
|
2021-06-22 02:07:19 +00:00
|
|
|
| + +
|
2018-10-20 20:36:17 +00:00
|
|
|
|
2020-01-11 00:19:09 +00:00
|
|
|
error: comparison operators cannot be chained
|
2022-01-13 23:44:17 +00:00
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:10:6
|
2018-10-20 20:36:17 +00:00
|
|
|
|
|
|
|
|
LL | f<X>();
|
2020-03-10 03:21:37 +00:00
|
|
|
| ^ ^
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
2018-10-20 20:36:17 +00:00
|
|
|
|
|
2019-09-30 02:07:26 +00:00
|
|
|
LL | f::<X>();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++
|
2019-09-30 02:07:26 +00:00
|
|
|
|
2020-01-11 00:19:09 +00:00
|
|
|
error: comparison operators cannot be chained
|
2022-01-13 23:44:17 +00:00
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:14:6
|
2019-09-30 02:07:26 +00:00
|
|
|
|
|
|
|
|
LL | f<Result<Option<X>, Option<Option<X>>>(1, 2);
|
2020-03-10 03:21:37 +00:00
|
|
|
| ^ ^
|
2020-01-11 00:19:09 +00:00
|
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
2019-09-30 02:07:26 +00:00
|
|
|
|
|
|
|
|
LL | f::<Result<Option<X>, Option<Option<X>>>(1, 2);
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++
|
2018-10-20 20:36:17 +00:00
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
|
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:18:17
|
|
|
|
|
|
|
|
|
LL | let _ = f<u8, i8>();
|
|
|
|
| ^ expected one of 8 possible tokens
|
|
|
|
|
|
|
|
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
|
|
|
|
|
|
|
|
LL | let _ = f::<u8, i8>();
|
|
|
|
| ++
|
|
|
|
|
2022-02-02 18:33:13 +00:00
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:22:17
|
|
|
|
|
|
|
|
|
LL | let _ = f<'_, i8>();
|
|
|
|
| ^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
error: expected one of `.`, `:`, `;`, `?`, `else`, `for`, `loop`, `while`, `{`, or an operator, found `,`
|
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:22:17
|
|
|
|
|
|
|
|
|
LL | let _ = f<'_, i8>();
|
|
|
|
| ^ expected one of 10 possible tokens
|
|
|
|
|
|
|
|
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
|
|
|
|
|
|
|
|
LL | let _ = f::<'_, i8>();
|
|
|
|
| ++
|
|
|
|
|
2022-02-02 18:33:13 +00:00
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:27:9
|
|
|
|
|
|
|
|
|
LL | f<'_>();
|
|
|
|
| ^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
error: comparison operators cannot be chained
|
2022-02-02 18:33:13 +00:00
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:27:6
|
2022-01-13 23:44:17 +00:00
|
|
|
|
|
|
|
|
LL | f<'_>();
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
|
|
|
|
|
|
|
|
LL | f::<'_>();
|
|
|
|
| ++
|
|
|
|
|
2020-01-11 00:19:09 +00:00
|
|
|
error: comparison operators cannot be chained
|
2022-02-02 18:33:13 +00:00
|
|
|
--> $DIR/require-parens-for-chained-comparison.rs:32:14
|
2019-10-01 18:24:05 +00:00
|
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
LL | let _ = f<u8>;
|
|
|
|
| ^ ^
|
2019-10-01 18:24:05 +00:00
|
|
|
|
|
2022-01-13 23:44:17 +00:00
|
|
|
= help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
2019-10-01 18:24:05 +00:00
|
|
|
= help: or use `(...)` if you meant to specify fn arguments
|
|
|
|
|
2022-02-02 18:33:13 +00:00
|
|
|
error: aborting due to 10 previous errors
|
2018-10-20 20:36:17 +00:00
|
|
|
|