An unknown external lang item was used.
Erroneous code example:
#![allow(unused)]
#![feature(lang_items)]
#![allow(internal_features)]
fn main() {
extern "C" {
#[lang = "cake"] // error: unknown external lang item: `cake`
fn cake();
}
} A list of available external lang items is available in compiler/rustc_hir/src/weak_lang_items.rs. Example:
#![allow(unused)]
#![feature(lang_items)]
#![allow(internal_features)]
fn main() {
extern "C" {
#[lang = "panic_impl"] // ok!
fn cake();
}
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0264.html