1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:2: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:6: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:10:6
|
LL | f<X>();
| ^ ^
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
LL | f::<X>();
| ++
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:14:6
|
LL | f<Result<Option<X>, Option<Option<X>>>(1, 2);
| ^ ^
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
LL | f::<Result<Option<X>, Option<Option<X>>>(1, 2);
| ++
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>();
| ++
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
|
help: add `'` to close the char literal
|
LL | let _ = f<'_', i8>();
| +
error: expected one of `.`, `:`, `;`, `?`, `else`, `for`, `loop`, `while`, or an operator, found `,`
--> $DIR/require-parens-for-chained-comparison.rs:22:17
|
LL | let _ = f<'_, i8>();
| ^ expected one of 9 possible tokens
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
LL | let _ = f::<'_, i8>();
| ++
error: expected `while`, `for`, `loop` or `{` after a label
--> $DIR/require-parens-for-chained-comparison.rs:28:9
|
LL | f<'_>();
| ^ expected `while`, `for`, `loop` or `{` after a label
|
help: add `'` to close the char literal
|
LL | f<'_'>();
| +
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:28:6
|
LL | f<'_>();
| ^ ^
|
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
|
LL | f::<'_>();
| ++
error: comparison operators cannot be chained
--> $DIR/require-parens-for-chained-comparison.rs:34:14
|
LL | let _ = f<u8>;
| ^ ^
|
= help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
= help: or use `(...)` if you meant to specify fn arguments
error: aborting due to 10 previous errors
|