fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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