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

63 lines
1.9 KiB
Plaintext
Raw Normal View History

2018-10-20 15:36:17 -05:00
error: chained comparison operators require parentheses
--> $DIR/require-parens-for-chained-comparison.rs:5:11
2018-10-20 15:36:17 -05:00
|
LL | false == false == false;
| ^^^^^^^^^^^
2018-10-20 15:36:17 -05:00
error: chained comparison operators require parentheses
--> $DIR/require-parens-for-chained-comparison.rs:8:11
2018-10-20 15:36:17 -05:00
|
LL | false == 0 < 2;
| ^^^^^^
2018-10-20 15:36:17 -05:00
error: chained comparison operators require parentheses
--> $DIR/require-parens-for-chained-comparison.rs:13:6
2018-10-20 15:36:17 -05:00
|
LL | f<X>();
| ^^^
2019-10-01 13:24:05 -05:00
help: use the "turbofish" `::<...>` instead of `<...>` to specify type arguments
2018-10-20 15:36:17 -05:00
|
LL | f::<X>();
| ^^
error: chained comparison operators require parentheses
--> $DIR/require-parens-for-chained-comparison.rs:17:6
|
LL | f<Result<Option<X>, Option<Option<X>>>(1, 2);
| ^^^^^^^^
2019-10-01 13:24:05 -05:00
help: use the "turbofish" `::<...>` instead of `<...>` to specify type arguments
|
LL | f::<Result<Option<X>, Option<Option<X>>>(1, 2);
| ^^
2018-10-20 15:36:17 -05:00
2019-10-01 13:24:05 -05:00
error: chained comparison operators require parentheses
--> $DIR/require-parens-for-chained-comparison.rs:22:21
|
LL | let _ = identity<u8>;
| ^^^^
|
= help: use the "turbofish" `::<...>` instead of `<...>` to specify type arguments
= help: or use `(...)` if you meant to specify fn arguments
error[E0308]: mismatched types
--> $DIR/require-parens-for-chained-comparison.rs:8:14
|
LL | false == 0 < 2;
| ^ expected bool, found integer
|
= note: expected type `bool`
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/require-parens-for-chained-comparison.rs:8:18
|
LL | false == 0 < 2;
| ^ expected bool, found integer
|
= note: expected type `bool`
found type `{integer}`
2019-10-01 13:24:05 -05:00
error: aborting due to 7 previous errors
2018-10-20 15:36:17 -05:00
For more information about this error, try `rustc --explain E0308`.