rust/src/test/ui/parser/require-parens-for-chained-comparison.stderr
Esteban Küber 89571a1bbc Tweak chained operators diagnostic
Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors
2020-03-25 17:13:04 -07:00

56 lines
1.4 KiB
Plaintext

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