]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/chained-comparison-suggestion.stderr
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / parser / chained-comparison-suggestion.stderr
1 error: comparison operators cannot be chained
2   --> $DIR/chained-comparison-suggestion.rs:4:7
3    |
4 LL |     1 < 2 <= 3;
5    |       ^   ^^
6    |
7 help: split the comparison into two
8    |
9 LL |     1 < 2 && 2 <= 3;
10    |           ++++
11
12 error: comparison operators cannot be chained
13   --> $DIR/chained-comparison-suggestion.rs:9:7
14    |
15 LL |     1 < 2 < 3;
16    |       ^   ^
17    |
18 help: split the comparison into two
19    |
20 LL |     1 < 2 && 2 < 3;
21    |           ++++
22
23 error: comparison operators cannot be chained
24   --> $DIR/chained-comparison-suggestion.rs:13:7
25    |
26 LL |     1 <= 2 < 3;
27    |       ^^   ^
28    |
29 help: split the comparison into two
30    |
31 LL |     1 <= 2 && 2 < 3;
32    |            ++++
33
34 error: comparison operators cannot be chained
35   --> $DIR/chained-comparison-suggestion.rs:18:7
36    |
37 LL |     1 <= 2 <= 3;
38    |       ^^   ^^
39    |
40 help: split the comparison into two
41    |
42 LL |     1 <= 2 && 2 <= 3;
43    |            ++++
44
45 error: comparison operators cannot be chained
46   --> $DIR/chained-comparison-suggestion.rs:23:7
47    |
48 LL |     1 > 2 >= 3;
49    |       ^   ^^
50    |
51 help: split the comparison into two
52    |
53 LL |     1 > 2 && 2 >= 3;
54    |           ++++
55
56 error: comparison operators cannot be chained
57   --> $DIR/chained-comparison-suggestion.rs:28:7
58    |
59 LL |     1 > 2 > 3;
60    |       ^   ^
61    |
62 help: split the comparison into two
63    |
64 LL |     1 > 2 && 2 > 3;
65    |           ++++
66
67 error: comparison operators cannot be chained
68   --> $DIR/chained-comparison-suggestion.rs:32:7
69    |
70 LL |     1 >= 2 > 3;
71    |       ^^   ^
72    |
73 help: split the comparison into two
74    |
75 LL |     1 >= 2 && 2 > 3;
76    |            ++++
77
78 error: comparison operators cannot be chained
79   --> $DIR/chained-comparison-suggestion.rs:36:7
80    |
81 LL |     1 >= 2 >= 3;
82    |       ^^   ^^
83    |
84 help: split the comparison into two
85    |
86 LL |     1 >= 2 && 2 >= 3;
87    |            ++++
88
89 error: comparison operators cannot be chained
90   --> $DIR/chained-comparison-suggestion.rs:41:7
91    |
92 LL |     1 == 2 < 3;
93    |       ^^   ^
94    |
95 help: parenthesize the comparison
96    |
97 LL |     1 == (2 < 3);
98    |          +     +
99
100 error: comparison operators cannot be chained
101   --> $DIR/chained-comparison-suggestion.rs:45:7
102    |
103 LL |     1 > 2 == false;
104    |       ^   ^^
105    |
106 help: parenthesize the comparison
107    |
108 LL |     (1 > 2) == false;
109    |     +     +
110
111 error: comparison operators cannot be chained
112   --> $DIR/chained-comparison-suggestion.rs:49:7
113    |
114 LL |     1 == 2 == 3;
115    |       ^^   ^^
116    |
117 help: split the comparison into two
118    |
119 LL |     1 == 2 && 2 == 3;
120    |            ++++
121
122 error[E0308]: mismatched types
123   --> $DIR/chained-comparison-suggestion.rs:4:14
124    |
125 LL |     1 < 2 <= 3;
126    |     -----    ^ expected `bool`, found integer
127    |     |
128    |     expected because this is `bool`
129
130 error[E0308]: mismatched types
131   --> $DIR/chained-comparison-suggestion.rs:13:14
132    |
133 LL |     1 <= 2 < 3;
134    |     ------   ^ expected `bool`, found integer
135    |     |
136    |     expected because this is `bool`
137
138 error[E0308]: mismatched types
139   --> $DIR/chained-comparison-suggestion.rs:18:15
140    |
141 LL |     1 <= 2 <= 3;
142    |     ------    ^ expected `bool`, found integer
143    |     |
144    |     expected because this is `bool`
145
146 error[E0308]: mismatched types
147   --> $DIR/chained-comparison-suggestion.rs:23:14
148    |
149 LL |     1 > 2 >= 3;
150    |     -----    ^ expected `bool`, found integer
151    |     |
152    |     expected because this is `bool`
153
154 error[E0308]: mismatched types
155   --> $DIR/chained-comparison-suggestion.rs:36:15
156    |
157 LL |     1 >= 2 >= 3;
158    |     ------    ^ expected `bool`, found integer
159    |     |
160    |     expected because this is `bool`
161
162 error[E0308]: mismatched types
163   --> $DIR/chained-comparison-suggestion.rs:49:15
164    |
165 LL |     1 == 2 == 3;
166    |     ------    ^ expected `bool`, found integer
167    |     |
168    |     expected because this is `bool`
169
170 error: aborting due to 17 previous errors
171
172 For more information about this error, try `rustc --explain E0308`.