@@ -112,46 +112,6 @@ reference when using guards or refactor the entire expression, perhaps by
112
112
putting the condition inside the body of the arm.
113
113
"## ,
114
114
115
- E0152 : r##"
116
- Lang items are already implemented in the standard library. Unless you are
117
- writing a free-standing application (e.g. a kernel), you do not need to provide
118
- them yourself.
119
-
120
- You can build a free-standing crate by adding `#![no_std]` to the crate
121
- attributes:
122
-
123
- #![feature(no_std)]
124
- #![no_std]
125
-
126
- See also https://doc.rust-lang.org/book/no-stdlib.html
127
- "## ,
128
-
129
- E0158 : r##"
130
- `const` and `static` mean different things. A `const` is a compile-time
131
- constant, an alias for a literal value. This property means you can match it
132
- directly within a pattern.
133
-
134
- The `static` keyword, on the other hand, guarantees a fixed location in memory.
135
- This does not always mean that the value is constant. For example, a global
136
- mutex can be declared `static` as well.
137
-
138
- If you want to match against a `static`, consider using a guard instead:
139
-
140
- static FORTY_TWO: i32 = 42;
141
- match Some(42) {
142
- Some(x) if x == FORTY_TWO => ...
143
- ...
144
- }
145
- "## ,
146
-
147
- E0161 : r##"
148
- In Rust, you can only move a value when its size is known at compile time.
149
-
150
- To work around this restriction, consider "hiding" the value behind a reference:
151
- either `&x` or `&mut x`. Since a reference has a fixed size, this lets you move
152
- it around as usual.
153
- "## ,
154
-
155
115
E0162 : r##"
156
116
An if-let pattern attempts to match the pattern, and enters the body if the
157
117
match was succesful. If the match is irrefutable (when it cannot fail to match),
@@ -217,6 +177,26 @@ use Method::*;
217
177
enum Method { GET, POST }
218
178
"## ,
219
179
180
+ E0267 : r##"
181
+ This error indicates the use of loop keyword (break or continue) inside a
182
+ closure but outside of any loop. Break and continue can be used as normal
183
+ inside closures as long as they are also contained within a loop. To halt the
184
+ execution of a closure you should instead use a return statement.
185
+ "## ,
186
+
187
+ E0268 : r##"
188
+ This error indicates the use of loop keyword (break or continue) outside of a
189
+ loop. Without a loop to break out of or continue in, no sensible action can be
190
+ taken.
191
+ "## ,
192
+
193
+ E0296 : r##"
194
+ This error indicates that the given recursion limit could not be parsed. Ensure
195
+ that the value provided is a positive integer between quotes, like so:
196
+
197
+ #![recursion_limit="1000"]
198
+ "## ,
199
+
220
200
E0297 : r##"
221
201
Patterns used to bind names must be irrefutable. That is, they must guarantee
222
202
that a name will be extracted in all cases. Instead of pattern matching the
@@ -293,16 +273,6 @@ match Some(5) {
293
273
}
294
274
295
275
See also https://github.com/rust-lang/rust/issues/14587
296
- "## ,
297
-
298
- E0306 : r##"
299
- In an array literal `[x; N]`, `N` is the number of elements in the array. This
300
- number cannot be negative.
301
- "## ,
302
-
303
- E0307 : r##"
304
- The length of an array is part of its type. For this reason, this length must be
305
- a compile-time constant.
306
276
"##
307
277
308
278
}
@@ -332,6 +302,10 @@ register_diagnostics! {
332
302
E0137 ,
333
303
E0138 ,
334
304
E0139 ,
305
+ E0152 ,
306
+ E0158 ,
307
+ E0161 ,
308
+ E0170 ,
335
309
E0261 , // use of undeclared lifetime name
336
310
E0262 , // illegal lifetime parameter name
337
311
E0263 , // lifetime name declared twice in same scope
@@ -363,6 +337,8 @@ register_diagnostics! {
363
337
E0300 , // unexpanded macro
364
338
E0304 , // expected signed integer constant
365
339
E0305 , // expected constant
340
+ E0306 , // expected positive integer for repeat count
341
+ E0307 , // expected constant integer for repeat count
366
342
E0308 ,
367
343
E0309 , // thing may not live long enough
368
344
E0310 , // thing may not live long enough
0 commit comments