We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 360d723 commit 4fa8483Copy full SHA for 4fa8483
src/librustc/diagnostics.rs
@@ -525,6 +525,17 @@ call to `mem::forget(v)` in case you want to avoid destructors being called.
525
"##,
526
527
E0152: r##"
528
+A lang item was redefined.
529
+
530
+Erroneous code example:
531
532
+```compile_fail
533
+#![feature(lang_items)]
534
535
+#[lang = "panic_fmt"]
536
+struct Foo; // error: duplicate lang item found: `panic_fmt`
537
+```
538
539
Lang items are already implemented in the standard library. Unless you are
540
writing a free-standing application (e.g. a kernel), you do not need to provide
541
them yourself.
0 commit comments