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