]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/require-parens-for-chained-comparison.stderr
New upstream version 1.42.0+dfsg1
[rustc.git] / src / test / ui / parser / require-parens-for-chained-comparison.stderr
CommitLineData
dfeec247 1error: comparison operators cannot be chained
0731742a 2 --> $DIR/require-parens-for-chained-comparison.rs:5:11
0bf4aa26
XL
3 |
4LL | false == false == false;
e74abb32 5 | ^^^^^^^^^^^
0bf4aa26 6
dfeec247 7error: comparison operators cannot be chained
0731742a 8 --> $DIR/require-parens-for-chained-comparison.rs:8:11
0bf4aa26
XL
9 |
10LL | false == 0 < 2;
e74abb32 11 | ^^^^^^
0bf4aa26 12
dfeec247 13error: comparison operators cannot be chained
0731742a 14 --> $DIR/require-parens-for-chained-comparison.rs:13:6
0bf4aa26
XL
15 |
16LL | f<X>();
e74abb32 17 | ^^^
0bf4aa26 18 |
e74abb32
XL
19help: use `::<...>` instead of `<...>` to specify type arguments
20 |
21LL | f::<X>();
22 | ^^
23
dfeec247 24error: comparison operators cannot be chained
e74abb32
XL
25 --> $DIR/require-parens-for-chained-comparison.rs:17:6
26 |
27LL | f<Result<Option<X>, Option<Option<X>>>(1, 2);
28 | ^^^^^^^^
29 |
dfeec247
XL
30help: split the comparison into two...
31 |
32LL | f < Result && Result <Option<X>, Option<Option<X>>>(1, 2);
33 | ^^^^^^^^^^^^^^^^^^^^^^
34help: ...or parenthesize one of the comparisons
35 |
36LL | (f < Result) <Option<X>, Option<Option<X>>>(1, 2);
37 | ^^^^^^^^^^^^^^
e74abb32
XL
38help: use `::<...>` instead of `<...>` to specify type arguments
39 |
40LL | f::<Result<Option<X>, Option<Option<X>>>(1, 2);
41 | ^^
42
dfeec247
XL
43error: comparison operators cannot be chained
44 --> $DIR/require-parens-for-chained-comparison.rs:24:21
e74abb32
XL
45 |
46LL | let _ = identity<u8>;
47 | ^^^^
48 |
49 = help: use `::<...>` instead of `<...>` to specify type arguments
0bf4aa26
XL
50 = help: or use `(...)` if you meant to specify fn arguments
51
0731742a
XL
52error[E0308]: mismatched types
53 --> $DIR/require-parens-for-chained-comparison.rs:8:14
54 |
55LL | false == 0 < 2;
60c5eb7d 56 | ^ expected `bool`, found integer
0731742a
XL
57
58error[E0308]: mismatched types
59 --> $DIR/require-parens-for-chained-comparison.rs:8:18
60 |
61LL | false == 0 < 2;
60c5eb7d 62 | ^ expected `bool`, found integer
0731742a 63
e74abb32 64error: aborting due to 7 previous errors
0bf4aa26 65
e1599b0c 66For more information about this error, try `rustc --explain E0308`.