E0152 - Error codes index
Description: Book listing all Rust error codes

## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Error code E0152

A lang item was redefined.

Erroneous code example:

    #![allow(unused)]
    #![feature(lang_items)]

    fn main() {
    #[lang = "owned_box"]
    struct Foo<T>(T); // error: duplicate lang item found: `owned_box`
    }

Lang items are already implemented in the standard library. Unless you are writing a free-standing application (e.g., a kernel), you do not need to provide them yourself.

You can build a free-standing crate by adding `#![no_std]` to the crate attributes:

    #![no_std]

See also this section of the Rustonomicon.