1
Fork 0

improve E0152 error explanation

This commit is contained in:
Guillaume Gomez 2016-05-27 21:57:06 +02:00
parent 360d7234c7
commit 4fa84830f8

View file

@ -525,6 +525,17 @@ call to `mem::forget(v)` in case you want to avoid destructors being called.
"##,
E0152: r##"
A lang item was redefined.
Erroneous code example:
```compile_fail
#![feature(lang_items)]
#[lang = "panic_fmt"]
struct Foo; // error: duplicate lang item found: `panic_fmt`
```
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.