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