We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c5572f commit 6471dccCopy full SHA for 6471dcc
src/librustc/diagnostics.rs
@@ -256,6 +256,21 @@ See [RFC 911] for more details on the design of `const fn`s.
256
[RFC 911]: https://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md
257
"##,
258
259
+E0016: r##"
260
+Blocks in constants may only contain items (such as constant, function
261
+definition, etc...) and a tail expression. Example:
262
+
263
+```
264
+const FOO: i32 = { let x = 0; x }; // 'x' isn't an item!
265
266
267
+To avoid it, you have to replace the non-item object:
268
269
270
+const FOO: i32 = { const X : i32 = 0; X };
271
272
+"##,
273
274
E0018: r##"
275
The value of static and const variables must be known at compile time. You
276
can't cast a pointer as an integer because we can't know what value the
0 commit comments