summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0264.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0264.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0264.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0264.md b/compiler/rustc_error_codes/src/error_codes/E0264.md
new file mode 100644
index 000000000..e2a27f7b1
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0264.md
@@ -0,0 +1,24 @@
+An unknown external lang item was used.
+
+Erroneous code example:
+
+```compile_fail,E0264
+#![feature(lang_items)]
+
+extern "C" {
+ #[lang = "cake"] // error: unknown external lang item: `cake`
+ fn cake();
+}
+```
+
+A list of available external lang items is available in
+`src/librustc_middle/middle/weak_lang_items.rs`. Example:
+
+```
+#![feature(lang_items)]
+
+extern "C" {
+ #[lang = "panic_impl"] // ok!
+ fn cake();
+}
+```