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