summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0010.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0010.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0010.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0010.md b/compiler/rustc_error_codes/src/error_codes/E0010.md
new file mode 100644
index 000000000..71c790e10
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0010.md
@@ -0,0 +1,11 @@
+The value of statics and constants must be known at compile time, and they live
+for the entire lifetime of a program. Creating a boxed value allocates memory on
+the heap at runtime, and therefore cannot be done at compile time.
+
+Erroneous code example:
+
+```compile_fail,E0010
+#![feature(box_syntax)]
+
+const CON : Box<i32> = box 0;
+```