Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improve E0152 error explanation
  • Loading branch information
GuillaumeGomez committed May 27, 2016
1 parent 360d723 commit 4fa8483
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/librustc/diagnostics.rs
Expand Up @@ -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.
Expand Down

0 comments on commit 4fa8483

Please sign in to comment.