rust/src/test/ui/parser/require-parens-for-chained-comparison.stderr

56 lines
1.4 KiB
Plaintext
Raw Normal View History

error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:5:11
2018-10-20 15:36:17 -05:00
|
LL | false == false == false;
| ^^ ^^
|
help: split the comparison into two
|
LL | false == false && false == false;
| ^^^^^^^^
2018-10-20 15:36:17 -05:00
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:9:11
2018-10-20 15:36:17 -05:00
|
LL | false == 0 < 2;
| ^^ ^
|
help: parenthesize the comparison
|
LL | false == (0 < 2);
| ^ ^
2018-10-20 15:36:17 -05:00
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:13:6
2018-10-20 15:36:17 -05:00
|
LL | f<X>();
| ^ ^
|
2019-10-03 15:22:18 -05:00
help: use `::<...>` instead of `<...>` to specify type arguments
2018-10-20 15:36:17 -05:00
|
LL | f::<X>();
| ^^
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:17:6
|
LL | f<Result<Option<X>, Option<Option<X>>>(1, 2);
| ^ ^
|
2019-10-03 15:22:18 -05:00
help: use `::<...>` instead of `<...>` to specify type arguments
|
LL | f::<Result<Option<X>, Option<Option<X>>>(1, 2);
| ^^
2018-10-20 15:36:17 -05:00
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:22:21
2019-10-01 13:24:05 -05:00
|
LL | let _ = identity<u8>;
| ^ ^
2019-10-01 13:24:05 -05:00
|
2019-10-03 15:22:18 -05:00
= help: use `::<...>` instead of `<...>` to specify type arguments
2019-10-01 13:24:05 -05:00
= help: or use `(...)` if you meant to specify fn arguments
error: aborting due to 5 previous errors
2018-10-20 15:36:17 -05:00